From f8ee5d5b4c1544643538ede226c832a3b474d201 Mon Sep 17 00:00:00 2001 From: tanjing Date: Mon, 11 Dec 2023 15:28:33 +0800 Subject: [PATCH] Update changelog 4.1.0.0-0k20 --- debian/changelog | 10 + debian/libqt5-ukui-style-dev.install | 1 - .../0019-Update-changelog-4.1.0.0-0k20.patch | 3963 +++++++++++++++++ debian/patches/series | 1 + debian/qt5-styles-ukui.install | 2 +- debian/qt5-ukui-platformtheme.install | 3 +- 6 files changed, 3976 insertions(+), 4 deletions(-) create mode 100644 debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch diff --git a/debian/changelog b/debian/changelog index 560ec1a..45cc430 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,13 @@ +qt5-ukui-platformtheme (4.1.0.0-ok20) nile; urgency=medium + + * 改动: + BUG号:无 + 需求号:#187224 特殊三联按钮 + 其他改动:工程转为cmake + 影响域:无 + + -- tanjing Mon, 11 Dec 2023 15:26:36 +0800 + qt5-ukui-platformtheme (4.1.0.0-ok19) nile; urgency=medium * 改动: diff --git a/debian/libqt5-ukui-style-dev.install b/debian/libqt5-ukui-style-dev.install index 2aa1f89..f0b2e28 100644 --- a/debian/libqt5-ukui-style-dev.install +++ b/debian/libqt5-ukui-style-dev.install @@ -1,4 +1,3 @@ -libqt5-ukui-style/*.h usr/include/qt5-ukui libqt5-ukui-style/*/*.h usr/include/qt5-ukui libqt5-ukui-style/*/*/*.h usr/include/qt5-ukui usr/lib/*/*.so diff --git a/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch b/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch new file mode 100644 index 0000000..6e1c895 --- /dev/null +++ b/debian/patches/0019-Update-changelog-4.1.0.0-0k20.patch @@ -0,0 +1,3963 @@ +From: tanjing +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 +-#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 +-#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 +-#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 ++ #include ++ ++ 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 +-#include "ui_kyfiledialog.h" ++#include "uikyfiledialog.h" + #include "kyfiledialogprivate.h" + #include "sidebar.h" + #include "pathbar.h" +@@ -64,7 +64,7 @@ + #include + #include + #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 + ++#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 + #include + #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 + #include + #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 . +- * +- * Authors: Jing Tan +- * +- */ +- +-#include "debug.h" +-#include "ui_kyfiledialog.h" +-#include +-#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 . +- * +- * Authors: Jing Tan +- * +- */ +- +-#include "debug.h" +-#ifndef UI_KYFILEDIALOG_H +-#define UI_KYFILEDIALOG_H +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include "sidebar.h" +-#include +-#include "kyfiledialog.h" +-#include +-#include +-#include "pathbar.h" +-#include +-#include +-#include +-#include +-#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 . ++ * ++ * Authors: Jing Tan ++ * ++ */ ++ ++#include "debug.h" ++#include "uikyfiledialog.h" ++#include ++#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 . ++ * ++ * Authors: Jing Tan ++ * ++ */ ++ ++#include "debug.h" ++#ifndef UI_KYFILEDIALOG_H ++#define UI_KYFILEDIALOG_H ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include "sidebar.h" ++#include ++#include "kyfiledialog.h" ++#include ++#include ++#include "pathbar.h" ++#include ++#include ++#include ++#include ++#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 + #include + #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 + #include +@@ -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 + +-#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 + #include + #include +-#include "highlight-effect.h" ++#include "effects/highlight-effect.h" + #include + + 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 + #include + #include +@@ -32,7 +32,7 @@ + + #include + +-#include "black-list.h" ++#include "settings/black-list.h" + + #include + #include +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 + #include +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 +-#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 + #include + +-#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 +-#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 + #include + +-#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 +-#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 + #include + +-#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 +-#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 + #include + +-#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 +-#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 +-#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 +-#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 +-#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 +-#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 +-#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 + #include + +-#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 + #include +@@ -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 +@@ -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 + ++#include ++#include ++#include ++#include ++#include ++ + class QStyleOptionViewItem; + class QDBusInterface; + +@@ -35,12 +41,6 @@ class QDBusInterface; + #define Style QProxyStyle + #endif + +-#include +-#include +-#include +-#include +-#include +-#include + + 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 + #include +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 + + #include +-#include "black-list.h" ++#include "settings/black-list.h" + + WindowManager::WindowManager(QObject *parent) : QObject(parent) + { diff --git a/debian/patches/series b/debian/patches/series index f7e386e..5c86718 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,3 +16,4 @@ 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 diff --git a/debian/qt5-styles-ukui.install b/debian/qt5-styles-ukui.install index ee90ed4..a56dac2 100644 --- a/debian/qt5-styles-ukui.install +++ b/debian/qt5-styles-ukui.install @@ -1,2 +1,2 @@ -/ukui-styles/qt5-config-style-ukui/themeconfig/* /usr/share/qt5-ukui-platformtheme/themeconfig usr/lib/*/qt5/plugins/styles/*.so +/usr/share/qt5-ukui-platformtheme/themeconfig/* diff --git a/debian/qt5-ukui-platformtheme.install b/debian/qt5-ukui-platformtheme.install index d655c8e..834c1f2 100644 --- a/debian/qt5-ukui-platformtheme.install +++ b/debian/qt5-ukui-platformtheme.install @@ -1,3 +1,2 @@ -qt5-ukui-filedialog/.qm/* /usr/share/qt5-ukui-platformtheme -qt5-ukui-platformtheme/.qm/* /usr/share/qt5-ukui-platformtheme +usr/share/qt5-ukui-platformtheme/*.qm usr/lib/*/qt5/plugins/platformthemes/*.so