From a443f3a9baa9df047c29cbde2e2a81b9da9bf9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Wed, 17 Apr 2024 21:39:55 +0800 Subject: [PATCH] update --- .github/workflows/windows-mingw.yml | 4 +- .github/workflows/windows-qt5.yml | 4 +- .github/workflows/windows.yml | 4 +- .gitignore | 4 +- example/CMakeLists.txt | 2 +- example/example_en_US.ts | 8 +- example/example_zh_CN.ts | 8 +- example/qml/page/T_Icons.qml | 2 +- example/qml/page/T_TreeView.qml | 65 ++++++++------- src/FluApp.cpp | 17 ++++ src/FluApp.h | 5 +- src/FluTextStyle.h | 2 +- src/FluTheme.cpp | 20 +---- src/FluTheme.h | 2 - .../imports/FluentUI/Controls/FluAcrylic.qml | 3 +- src/Qt5/imports/FluentUI/Controls/FluMenu.qml | 4 +- .../FluentUI/Controls/FluTableView.qml | 8 +- .../imports/FluentUI/Controls/FluTreeView.qml | 29 ++++--- src/Qt5/imports/FluentUI/plugins.qmltypes | 79 +++++++++++++------ src/Qt6/imports/FluentUI/Controls/FluMenu.qml | 4 +- .../FluentUI/Controls/FluTableView.qml | 7 +- .../imports/FluentUI/Controls/FluTreeView.qml | 7 +- 22 files changed, 169 insertions(+), 119 deletions(-) diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml index cd67f8b7..82b8f395 100644 --- a/.github/workflows/windows-mingw.yml +++ b/.github/workflows/windows-mingw.yml @@ -91,14 +91,14 @@ jobs: if: startsWith(github.event.ref, 'refs/tags/') uses: zhuzichu520/inno-setup-action@v1.0.1 with: - filepath: ./action-cli/InstallerScript.iss + filepath: ./package/InstallerScript.iss - name: uploadRelease if: startsWith(github.event.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./action-cli/installer.exe + file: ./package/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} overwrite: true diff --git a/.github/workflows/windows-qt5.yml b/.github/workflows/windows-qt5.yml index 3d9bca90..b5006776 100644 --- a/.github/workflows/windows-qt5.yml +++ b/.github/workflows/windows-qt5.yml @@ -78,14 +78,14 @@ jobs: if: startsWith(github.event.ref, 'refs/tags/') uses: zhuzichu520/inno-setup-action@v1.0.1 with: - filepath: ./action-cli/InstallerScript.iss + filepath: ./package/InstallerScript.iss - name: uploadRelease if: startsWith(github.event.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./action-cli/installer.exe + file: ./package/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} overwrite: true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index c4d2339f..8bbdf0d6 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -85,14 +85,14 @@ jobs: if: startsWith(github.event.ref, 'refs/tags/') uses: zhuzichu520/inno-setup-action@v1.0.1 with: - filepath: ./action-cli/InstallerScript.iss + filepath: ./package/InstallerScript.iss - name: uploadRelease if: startsWith(github.event.ref, 'refs/tags/') uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: ./action-cli/installer.exe + file: ./package/installer.exe asset_name: ${{ env.fileName }}_${{ github.ref_name }}_${{ matrix.qt_arch }}_Qt${{ matrix.qt_ver }}.exe tag: ${{ github.ref }} overwrite: true diff --git a/.gitignore b/.gitignore index 628dcf16..ebfb74a5 100644 --- a/.gitignore +++ b/.gitignore @@ -36,10 +36,8 @@ bin build cmake-build-* .idea - +package example/Version.h - -action-cli dist *.qm \ No newline at end of file diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 0fc53fe1..149f0065 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -69,7 +69,7 @@ if (WIN32) ) configure_file( ${CMAKE_SOURCE_DIR}/.cmake/InstallerScript.iss.in - ${CMAKE_SOURCE_DIR}/action-cli/InstallerScript.iss + ${CMAKE_SOURCE_DIR}/package/InstallerScript.iss ) endif () diff --git a/example/example_en_US.ts b/example/example_en_US.ts index 3301be2d..a47dc335 100644 --- a/example/example_en_US.ts +++ b/example/example_en_US.ts @@ -2394,22 +2394,22 @@ Some contents... - + Title - + Name - + Avatar - + Address diff --git a/example/example_zh_CN.ts b/example/example_zh_CN.ts index a1871548..dd7776bd 100644 --- a/example/example_zh_CN.ts +++ b/example/example_zh_CN.ts @@ -2504,22 +2504,22 @@ Some contents... 共计选中%1条数据 - + Title 标题 - + Address 地址 - + Avatar 头像 - + Name 名称 diff --git a/example/qml/page/T_Icons.qml b/example/qml/page/T_Icons.qml index 7e48bcd5..43d80442 100644 --- a/example/qml/page/T_Icons.qml +++ b/example/qml/page/T_Icons.qml @@ -33,7 +33,7 @@ FluContentPage { cellHeight: 110 clip: true boundsBehavior: GridView.StopAtBounds - model:FluTheme.awesomeList() + model: FluApp.iconDatas() ScrollBar.vertical: FluScrollBar {} anchors{ topMargin: 10 diff --git a/example/qml/page/T_TreeView.qml b/example/qml/page/T_TreeView.qml index a42010f1..928677de 100644 --- a/example/qml/page/T_TreeView.qml +++ b/example/qml/page/T_TreeView.qml @@ -162,7 +162,8 @@ FluContentPage { } } - FluFrame{ + FluTreeView{ + id:tree_view anchors{ left: parent.left top: layout_controls.bottom @@ -170,39 +171,35 @@ FluContentPage { bottom: parent.bottom right: parent.right } - FluTreeView{ - id:tree_view - anchors.fill: parent - cellHeight: slider_cell_height.value - showLine: switch_showline.checked - checkable:switch_checkable.checked - depthPadding: slider_depth_padding.value - onCurrentChanged: { - showInfo(current.data.title) - } - columnSource:[ - { - title: qsTr("Title"), - dataIndex: 'title', - width: 300 - },{ - title: qsTr("Name"), - dataIndex: 'name', - width: 100 - },{ - title: qsTr("Avatar"), - dataIndex: 'avatar', - width: 100 - },{ - title: qsTr("Address"), - dataIndex: 'address', - width: 200 - }, - ] - Component.onCompleted: { - var data = treeData() - dataSource = data - } + cellHeight: slider_cell_height.value + showLine: switch_showline.checked + checkable:switch_checkable.checked + depthPadding: slider_depth_padding.value + onCurrentChanged: { + showInfo(current.data.title) + } + columnSource:[ + { + title: qsTr("Title"), + dataIndex: 'title', + width: 300 + },{ + title: qsTr("Name"), + dataIndex: 'name', + width: 100 + },{ + title: qsTr("Avatar"), + dataIndex: 'avatar', + width: 100 + },{ + title: qsTr("Address"), + dataIndex: 'address', + width: 200 + }, + ] + Component.onCompleted: { + var data = treeData() + dataSource = data } } } diff --git a/src/FluApp.cpp b/src/FluApp.cpp index f2c3c3b4..36bfd3fa 100644 --- a/src/FluApp.cpp +++ b/src/FluApp.cpp @@ -9,6 +9,7 @@ #include #include #include +#include "FluentIconDef.h" FluApp::FluApp(QObject *parent) : QObject{parent} { _useSystemAppBar = false; @@ -30,3 +31,19 @@ void FluApp::init(QObject *target, QLocale locale) { } } } + +[[maybe_unused]] QJsonArray FluApp::iconDatas(const QString &keyword) { + QJsonArray arr; + QMetaEnum enumType = Fluent_Icons::staticMetaObject.enumerator(Fluent_Icons::staticMetaObject.indexOfEnumerator("Fluent_IconType")); + for (int i = 0; i <= enumType.keyCount() - 1; ++i) { + QString name = enumType.key(i); + int icon = enumType.value(i); + if (keyword.isEmpty() || name.contains(keyword)) { + QJsonObject obj; + obj.insert("name", name); + obj.insert("icon", icon); + arr.append(obj); + } + } + return arr; +} diff --git a/src/FluApp.h b/src/FluApp.h index c291dbfc..89934208 100644 --- a/src/FluApp.h +++ b/src/FluApp.h @@ -8,6 +8,7 @@ #include #include #include +#include #include "stdafx.h" #include "singleton.h" @@ -35,7 +36,9 @@ SINGLETON(FluApp) Q_INVOKABLE void init(QObject *target, QLocale locale = QLocale::system()); + [[maybe_unused]] Q_INVOKABLE static QJsonArray iconDatas(const QString &keyword = ""); + private: QQmlEngine *_engine{}; QTranslator *_translator = nullptr; -}; \ No newline at end of file +}; diff --git a/src/FluTextStyle.h b/src/FluTextStyle.h index defa9d1e..8143ce1e 100644 --- a/src/FluTextStyle.h +++ b/src/FluTextStyle.h @@ -30,4 +30,4 @@ public: SINGLETON(FluTextStyle) static FluTextStyle *create(QQmlEngine *, QJSEngine *) { return getInstance(); } -}; \ No newline at end of file +}; diff --git a/src/FluTheme.cpp b/src/FluTheme.cpp index 1662aa7e..e0efe346 100644 --- a/src/FluTheme.cpp +++ b/src/FluTheme.cpp @@ -47,8 +47,8 @@ void FluTheme::refreshColors() { fontSecondaryColor(isDark ? QColor(222, 222, 222, 255) : QColor(102, 102, 102, 255)); fontTertiaryColor(isDark ? QColor(200, 200, 200, 255) : QColor(153, 153, 153, 255)); itemNormalColor(isDark ? QColor(255, 255, 255, 0) : QColor(0, 0, 0, 0)); - frameColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.12)) : QColor(0, 0, 0, qRound(255 * 0.09))); - frameActiveColor(isDark ? QColor(48, 48, 48, qRound(255 * 0.8)) : QColor(255, 255, 255, qRound(255 * 0.6))); + frameColor(isDark ? QColor(56, 56, 56, qRound(255 * 0.8)) : QColor(233, 233, 233, qRound(255 * 0.8))); + frameActiveColor(isDark ? QColor(48, 48, 48, qRound(255 * 0.8)) : QColor(255, 255, 255, qRound(255 * 0.8))); itemHoverColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.06)) : QColor(0, 0, 0, qRound(255 * 0.03))); itemPressColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.09)) : QColor(0, 0, 0, qRound(255 * 0.06))); itemCheckColor(isDark ? QColor(255, 255, 255, qRound(255 * 0.12)) : QColor(0, 0, 0, qRound(255 * 0.09))); @@ -64,22 +64,6 @@ bool FluTheme::eventFilter(QObject *, QEvent *event) { return false; } -[[maybe_unused]] QJsonArray FluTheme::awesomeList(const QString &keyword) { - QJsonArray arr; - QMetaEnum enumType = Fluent_Icons::staticMetaObject.enumerator(Fluent_Icons::staticMetaObject.indexOfEnumerator("Fluent_IconType")); - for (int i = 0; i <= enumType.keyCount() - 1; ++i) { - QString name = enumType.key(i); - int icon = enumType.value(i); - if (keyword.isEmpty() || name.contains(keyword)) { - QJsonObject obj; - obj.insert("name", name); - obj.insert("icon", icon); - arr.append(obj); - } - } - return arr; -} - bool FluTheme::dark() const { if (_darkMode == FluThemeType::DarkMode::Dark) { return true; diff --git a/src/FluTheme.h b/src/FluTheme.h index 2c6fb1a5..b26cdb6c 100644 --- a/src/FluTheme.h +++ b/src/FluTheme.h @@ -60,8 +60,6 @@ protected: public: SINGLETON(FluTheme) - [[maybe_unused]] Q_INVOKABLE static QJsonArray awesomeList(const QString &keyword = ""); - Q_SIGNAL void darkChanged(); static FluTheme *create(QQmlEngine *, QJSEngine *) { return getInstance(); } diff --git a/src/Qt5/imports/FluentUI/Controls/FluAcrylic.qml b/src/Qt5/imports/FluentUI/Controls/FluAcrylic.qml index 58137df7..a432c32c 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluAcrylic.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluAcrylic.qml @@ -8,7 +8,7 @@ Item { property real tintOpacity: 0.65 property real luminosity: 0.01 property real noiseOpacity: 0.02 - property var target + property alias target : effect_source.sourceItem property int blurRadius: 32 property rect targetRect: Qt.rect(control.x, control.y, control.width,control.height) ShaderEffectSource { @@ -16,7 +16,6 @@ Item { anchors.fill: parent visible: false sourceRect: control.targetRect - sourceItem: control.target } FastBlur { id: fast_blur diff --git a/src/Qt5/imports/FluentUI/Controls/FluMenu.qml b/src/Qt5/imports/FluentUI/Controls/FluMenu.qml index 332bce1c..c0c7cf1b 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluMenu.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluMenu.qml @@ -44,8 +44,8 @@ T.Menu { background: Rectangle { implicitWidth: 150 implicitHeight: 36 - color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/255,1) - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) + color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(252/255,252/255,252/255,1) + border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1) border.width: 1 radius: 5 FluShadow{} diff --git a/src/Qt5/imports/FluentUI/Controls/FluTableView.qml b/src/Qt5/imports/FluentUI/Controls/FluTableView.qml index 3a6d429c..8cb9c66b 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTableView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTableView.qml @@ -1,4 +1,5 @@ import QtQuick 2.15 +import QtQuick.Window 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import Qt.labs.qmlmodels 1.0 @@ -17,7 +18,12 @@ Rectangle { property color selectedBorderColor: FluTheme.primaryColor property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) id:control - color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + color: { + if(Window.active){ + return FluTheme.frameActiveColor + } + return FluTheme.frameColor + } onColumnSourceChanged: { if(columnSource.length!==0){ var columns= [] diff --git a/src/Qt5/imports/FluentUI/Controls/FluTreeView.qml b/src/Qt5/imports/FluentUI/Controls/FluTreeView.qml index c74872a9..df84c4d5 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTreeView.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTreeView.qml @@ -18,21 +18,28 @@ Rectangle { property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) readonly property alias current: d.current id:control - color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + color: { + if(Window.active){ + return FluTheme.frameActiveColor + } + return FluTheme.frameColor + } onDataSourceChanged: { tree_model.setDataSource(dataSource) } onColumnSourceChanged: { - var columns= [] - var headerRow = {} - columnSource.forEach(function(item){ - var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control); - column.display = item.dataIndex - columns.push(column) - headerRow[item.dataIndex] = item.title - }) - header_column_model.columns = columns - header_column_model.rows = [headerRow] + if(columnSource.length !== 0){ + var columns= [] + var headerRow = {} + columnSource.forEach(function(item){ + var column = Qt.createQmlObject('import Qt.labs.qmlmodels 1.0;TableModelColumn{}',control); + column.display = item.dataIndex + columns.push(column) + headerRow[item.dataIndex] = item.title + }) + header_column_model.columns = columns + header_column_model.rows = [headerRow] + } } FluTreeModel{ id:tree_model diff --git a/src/Qt5/imports/FluentUI/plugins.qmltypes b/src/Qt5/imports/FluentUI/plugins.qmltypes index 365b380d..92a7e970 100644 --- a/src/Qt5/imports/FluentUI/plugins.qmltypes +++ b/src/Qt5/imports/FluentUI/plugins.qmltypes @@ -38,6 +38,12 @@ Module { name: "init" Parameter { name: "target"; type: "QObject"; isPointer: true } } + Method { + name: "iconDatas" + type: "QJsonArray" + Parameter { name: "keyword"; type: "string" } + } + Method { name: "iconDatas"; type: "QJsonArray" } } Component { name: "FluCalendarViewType" @@ -133,10 +139,10 @@ Module { exports: ["FluentUI/FluFrameless 1.0"] exportMetaObjectRevisions: [0] Property { name: "appbar"; type: "QQuickItem"; isPointer: true } - Property { name: "topmost"; type: "bool" } Property { name: "maximizeButton"; type: "QQuickItem"; isPointer: true } Property { name: "minimizedButton"; type: "QQuickItem"; isPointer: true } Property { name: "closeButton"; type: "QQuickItem"; isPointer: true } + Property { name: "topmost"; type: "bool" } Property { name: "disabled"; type: "bool" } Property { name: "fixSize"; type: "bool" } Method { name: "showFullScreen" } @@ -318,18 +324,16 @@ Module { Property { name: "fontSecondaryColor"; type: "QColor" } Property { name: "fontTertiaryColor"; type: "QColor" } Property { name: "itemNormalColor"; type: "QColor" } + Property { name: "frameColor"; type: "QColor" } + Property { name: "frameActiveColor"; type: "QColor" } Property { name: "itemHoverColor"; type: "QColor" } Property { name: "itemPressColor"; type: "QColor" } Property { name: "itemCheckColor"; type: "QColor" } + Property { name: "desktopImagePath"; type: "string" } Property { name: "darkMode"; type: "int" } Property { name: "nativeText"; type: "bool" } Property { name: "animationEnabled"; type: "bool" } - Method { - name: "awesomeList" - type: "QJsonArray" - Parameter { name: "keyword"; type: "string" } - } - Method { name: "awesomeList"; type: "QJsonArray" } + Property { name: "blurBehindWindowEnabled"; type: "bool" } } Component { name: "FluThemeType" @@ -480,6 +484,18 @@ Module { type: "QRect" Parameter { name: "window"; type: "QQuickWindow"; isPointer: true } } + Method { name: "getWallpaperFilePath"; type: "string" } + Method { + name: "imageMainColor" + type: "QColor" + Parameter { name: "image"; type: "QImage" } + Parameter { name: "bright"; type: "double" } + } + Method { + name: "imageMainColor" + type: "QColor" + Parameter { name: "image"; type: "QImage" } + } } Component { name: "FluTreeModel" @@ -487,7 +503,6 @@ Module { exports: ["FluentUI/FluTreeModel 1.0"] exportMetaObjectRevisions: [0] Property { name: "dataSourceSize"; type: "int" } - Property { name: "selectionModel"; type: "QList" } Property { name: "columnSource"; type: "QList" } Method { name: "removeRows" @@ -504,6 +519,11 @@ Module { type: "QObject*" Parameter { name: "row"; type: "int" } } + Method { + name: "setRow" + Parameter { name: "row"; type: "int" } + Parameter { name: "data"; type: "QVariantMap" } + } Method { name: "setData" Parameter { name: "data"; type: "QList" } @@ -541,6 +561,7 @@ Module { } Method { name: "allExpand" } Method { name: "allCollapse" } + Method { name: "selectionModel"; type: "QVariant" } } Component { name: "FluTreeViewType" @@ -584,12 +605,12 @@ Module { } } Component { - name: "Fluent_Awesome" + name: "Fluent_Icons" exports: ["FluentUI/FluentIcons 1.0"] isCreatable: false exportMetaObjectRevisions: [0] Enum { - name: "Fluent_AwesomeType" + name: "Fluent_IconType" values: { "GlobalNavButton": 59136, "Wifi": 59137, @@ -2421,37 +2442,37 @@ Module { Property { name: "darkClickListener"; type: "QVariant" } Property { name: "buttonStayTop" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "buttonMinimize" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "buttonMaximize" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "buttonClose" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "buttonDark" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "layoutMacosButtons" - type: "FluLoader_QMLTYPE_12" + type: "FluLoader_QMLTYPE_14" isReadonly: true isPointer: true } @@ -3148,8 +3169,8 @@ Module { Property { name: "actionItem"; type: "QQmlComponent"; isPointer: true } Property { name: "topPadding"; type: "int" } Property { name: "pageMode"; type: "int" } - Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true } - Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_42"; isPointer: true } + Property { name: "navItemRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true } + Property { name: "navItemExpanderRightMenu"; type: "FluMenu_QMLTYPE_33"; isPointer: true } Property { name: "navCompactWidth"; type: "int" } Property { name: "navTopMargin"; type: "int" } Property { name: "cellHeight"; type: "int" } @@ -3157,13 +3178,13 @@ Module { Property { name: "hideNavAppBar"; type: "bool" } Property { name: "buttonMenu" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } Property { name: "buttonBack" - type: "FluIconButton_QMLTYPE_19" + type: "FluIconButton_QMLTYPE_20" isReadonly: true isPointer: true } @@ -3975,21 +3996,23 @@ Module { Property { name: "previousText"; type: "string" } } Component { - prototype: "QQuickItem" + prototype: "QQuickRectangle" name: "FluentUI/FluTreeView 1.0" exports: ["FluentUI/FluTreeView 1.0"] exportMetaObjectRevisions: [0] isComposite: true defaultProperty: "data" - Property { name: "currentIndex"; type: "int" } Property { name: "dataSource"; type: "QVariant" } + Property { name: "columnSource"; type: "QVariant" } Property { name: "showLine"; type: "bool" } - Property { name: "draggable"; type: "bool" } Property { name: "cellHeight"; type: "int" } Property { name: "depthPadding"; type: "int" } Property { name: "checkable"; type: "bool" } Property { name: "lineColor"; type: "QColor" } - Method { name: "selectionModel"; type: "QVariant" } + Property { name: "borderColor"; type: "QColor" } + Property { name: "selectedBorderColor"; type: "QColor" } + Property { name: "selectedColor"; type: "QColor" } + Property { name: "current"; type: "QVariant"; isReadonly: true } Method { name: "count"; type: "QVariant" } Method { name: "visibleCount"; type: "QVariant" } Method { @@ -4004,6 +4027,14 @@ Module { } Method { name: "allExpand"; type: "QVariant" } Method { name: "allCollapse"; type: "QVariant" } + Method { + name: "customItem" + type: "QVariant" + Parameter { name: "comId"; type: "QVariant" } + Parameter { name: "options"; type: "QVariant" } + } + Method { name: "closeEditor"; type: "QVariant" } + Method { name: "selectionModel"; type: "QVariant" } } Component { prototype: "QQuickWindowQmlImpl" diff --git a/src/Qt6/imports/FluentUI/Controls/FluMenu.qml b/src/Qt6/imports/FluentUI/Controls/FluMenu.qml index 92dd2e7d..4298d725 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluMenu.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluMenu.qml @@ -44,8 +44,8 @@ T.Menu { background: Rectangle { implicitWidth: 150 implicitHeight: 36 - color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(240/255,240/255,240/255,1) - border.color: FluTheme.dark ? Window.active ? Qt.rgba(55/255,55/255,55/255,1):Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(226/255,229/255,234/255,1) + color:FluTheme.dark ? Qt.rgba(45/255,45/255,45/255,1) : Qt.rgba(252/255,252/255,252/255,1) + border.color: FluTheme.dark ? Qt.rgba(26/255,26/255,26/255,1) : Qt.rgba(191/255,191/255,191/255,1) border.width: 1 radius: 5 FluShadow{} diff --git a/src/Qt6/imports/FluentUI/Controls/FluTableView.qml b/src/Qt6/imports/FluentUI/Controls/FluTableView.qml index a8634eb6..90b027a0 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluTableView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluTableView.qml @@ -18,7 +18,12 @@ Rectangle { property color selectedBorderColor: FluTheme.primaryColor property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) id:control - color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + color: { + if(Window.active){ + return FluTheme.frameActiveColor + } + return FluTheme.frameColor + } onColumnSourceChanged: { if(columnSource.length!==0){ var columns= [] diff --git a/src/Qt6/imports/FluentUI/Controls/FluTreeView.qml b/src/Qt6/imports/FluentUI/Controls/FluTreeView.qml index 47fbb0a1..432f1b74 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluTreeView.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluTreeView.qml @@ -18,7 +18,12 @@ Rectangle { property color selectedColor: FluTools.withOpacity(FluTheme.primaryColor,0.3) readonly property alias current: d.current id:control - color: FluTheme.dark ? Qt.rgba(39/255,39/255,39/255,1) : Qt.rgba(251/255,251/255,253/255,1) + color: { + if(Window.active){ + return FluTheme.frameActiveColor + } + return FluTheme.frameColor + } onDataSourceChanged: { tree_model.setDataSource(dataSource) }