From 2d1957afe358289af9ad8cbfa20ea304892ce673 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Thu, 28 Dec 2023 22:55:38 +0800 Subject: [PATCH] update --- .github/workflows/macos.yml | 4 ++-- .github/workflows/ubuntu.yml | 4 ++-- .github/workflows/windows-mingw.yml | 4 ++-- .github/workflows/windows.yml | 4 ++-- src/FluColorSet.h | 2 ++ src/FluColors.cpp | 16 ++++++++-------- src/FluFramelessHelper.cpp | 5 +---- 7 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index a314ca85..8bbc1091 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [macos-13] - qt_ver: [6.6.0] + qt_ver: [6.6.1] qt_arch: [clang_64] env: targetName: example @@ -50,7 +50,7 @@ jobs: cmake --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/6.6.0/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/Users/runner/work/FluentUI/Qt/6.6.1/macos -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: package diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 06b6b411..bc25ccd5 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [ubuntu-20.04] - qt_ver: [6.6.0] + qt_ver: [6.6.1] qt_arch: [gcc_64] env: targetName: example @@ -55,7 +55,7 @@ jobs: cmake --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/6.6.0/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=/home/runner/work/FluentUI/Qt/6.6.1/gcc_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: install QT linux deploy diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml index 4a199735..470cbaec 100644 --- a/.github/workflows/windows-mingw.yml +++ b/.github/workflows/windows-mingw.yml @@ -24,7 +24,7 @@ jobs: os: [windows-2022] include: - qt_arch: win64_mingw - qt_ver: 6.6.0 + qt_ver: 6.6.1 qt_tools: "tools_mingw,9.0.0-1-202203221220,qt.tools.win64_mingw900" qt_tools_mingw_install: mingw900_64 env: @@ -69,7 +69,7 @@ jobs: mkdir build cd build ninja --version - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.0\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.1\mingw_64 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel - name: package diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 96a1230e..a2a72955 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -23,7 +23,7 @@ jobs: matrix: os: [windows-2019] include: - - qt_ver: 6.6.0 + - qt_ver: 6.6.1 qt_arch: win64_msvc2019_64 msvc_arch: x64 qt_arch_install: msvc2019_64 @@ -52,7 +52,7 @@ jobs: ninja --version mkdir build cd build - cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.0\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. + cmake -DCMAKE_MESSAGE_LOG_LEVEL=STATUS -DCMAKE_PREFIX_PATH=D:\a\FluentUI\Qt\6.6.1\msvc2019_64 -DCMAKE_C_COMPILER=cl -DCMAKE_CXX_COMPILER=cl -DCMAKE_BUILD_TYPE=Release -GNinja .. cmake --build . --target all --config Release --parallel echo winSdkDir=%WindowsSdkDir% >> %GITHUB_ENV% echo winSdkVer=%WindowsSdkVersion% >> %GITHUB_ENV% diff --git a/src/FluColorSet.h b/src/FluColorSet.h index 364f6b9d..51f025e2 100644 --- a/src/FluColorSet.h +++ b/src/FluColorSet.h @@ -2,6 +2,7 @@ #define FLUCOLORSET_H #include +#include #include "stdafx.h" /** @@ -17,6 +18,7 @@ class FluColorSet : public QObject Q_PROPERTY_AUTO(QString,light) Q_PROPERTY_AUTO(QString,lighter) Q_PROPERTY_AUTO(QString,lightest) + QML_NAMED_ELEMENT(FluColorSet) public: explicit FluColorSet(QObject *parent = nullptr); }; diff --git a/src/FluColors.cpp b/src/FluColors.cpp index 32e62253..3e06ed4c 100644 --- a/src/FluColors.cpp +++ b/src/FluColors.cpp @@ -27,7 +27,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ Grey210("#161514"); Grey220("#11100f"); - FluColorSet *yellow = new FluColorSet(); + FluColorSet *yellow = new FluColorSet(this); yellow->darkest("#f9a825"); yellow->darker("#fbc02d"); yellow->dark("#fdd435"); @@ -37,7 +37,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ yellow->lightest("#fff59b"); Yellow(yellow); - FluColorSet *orange = new FluColorSet(); + FluColorSet *orange = new FluColorSet(this); orange->darkest("#993d07"); orange->darker("#ac4408"); orange->dark("#d1580a"); @@ -47,7 +47,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ orange->lightest("#fac06a"); Orange(orange); - FluColorSet *red = new FluColorSet(); + FluColorSet *red = new FluColorSet(this); red->darkest("#8f0a15"); red->darker("#a20b18"); red->dark("#b90d1c"); @@ -57,7 +57,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ red->lightest("#f06b76"); Red(red); - FluColorSet *magenta = new FluColorSet(); + FluColorSet *magenta = new FluColorSet(this); magenta->darkest("#6f004f"); magenta->darker("#a0076c"); magenta->dark("#b50d7d"); @@ -67,7 +67,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ magenta->lightest("#f18cd5"); Magenta(magenta); - FluColorSet *purple = new FluColorSet(); + FluColorSet *purple = new FluColorSet(this); purple->darkest("#2c0f76"); purple->darker("#3d0f99"); purple->dark("#4e11ae"); @@ -77,7 +77,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ purple->lightest("#9e8ed9"); Purple(purple); - FluColorSet *blue = new FluColorSet(); + FluColorSet *blue = new FluColorSet(this); blue->darkest("#004A83"); blue->darker("#005494"); blue->dark("#0066B4"); @@ -87,7 +87,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ blue->lightest("#60ABE4"); Blue(blue); - FluColorSet *teal = new FluColorSet(); + FluColorSet *teal = new FluColorSet(this); teal->darkest("#006E5B"); teal->darker("#007C67"); teal->dark("#00977D"); @@ -97,7 +97,7 @@ FluColors::FluColors(QObject *parent):QObject{parent}{ teal->lightest("#60CFBC"); Teal(teal); - FluColorSet *green = new FluColorSet(); + FluColorSet *green = new FluColorSet(this); green->darkest("#094C09"); green->darker("#0C5D0C"); green->dark("#0E6F0E"); diff --git a/src/FluFramelessHelper.cpp b/src/FluFramelessHelper.cpp index 603082d1..db74b522 100644 --- a/src/FluFramelessHelper.cpp +++ b/src/FluFramelessHelper.cpp @@ -234,10 +234,7 @@ void FluFramelessHelper::componentComplete(){ } if(!window.isNull()){ #ifdef Q_OS_WIN -#if (QT_VERSION == QT_VERSION_CHECK(6, 5, 3)) - window->setFlag(Qt::FramelessWindowHint,true); -#endif - window->setFlag(Qt::WindowMinimizeButtonHint,true); + window->setFlags(window->flags() | Qt::FramelessWindowHint | Qt::WindowMinimizeButtonHint); _nativeEvent =new FramelessEventFilter(this); qApp->installNativeEventFilter(_nativeEvent); HWND hwnd = reinterpret_cast(window->winId());