diff --git a/example/CMakeLists.txt b/example/CMakeLists.txt index 854e4394..3b30ba4b 100644 --- a/example/CMakeLists.txt +++ b/example/CMakeLists.txt @@ -3,10 +3,9 @@ cmake_minimum_required(VERSION 3.20) project(example VERSION 1.0) #配置通用编译 +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -if(APPLE) - set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) -endif() + #导入exmaple的QML位置,不然import example有时候会爆红 set(QML_IMPORT_PATH ${CMAKE_BINARY_DIR}/example CACHE STRING "Qt Creator extra QML import paths" FORCE) diff --git a/example/src/helper/Log.cpp b/example/src/helper/Log.cpp index b9a97222..e5417e56 100644 --- a/example/src/helper/Log.cpp +++ b/example/src/helper/Log.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include "Version.h" #ifdef WIN32 #include diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e6c965b3..a8da3d6a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,10 +7,9 @@ else() endif() #配置通用编译 +set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) -if(APPLE) - set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE) -endif() + if (FLUENTUI_BUILD_STATIC_LIB) add_definitions(-DFLUENTUI_BUILD_STATIC_LIB) diff --git a/src/Qt5/imports/FluentUI/Controls/FluAppBar.qml b/src/Qt5/imports/FluentUI/Controls/FluAppBar.qml index 46c4bbfb..a2966354 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluAppBar.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluAppBar.qml @@ -34,10 +34,17 @@ Rectangle{ property bool isMac: FluTools.isMacos() property color borerlessColor : FluTheme.primaryColor property var maxClickListener : function(){ - if (d.win.visibility === Window.Maximized) - d.win.visibility = Window.Windowed - else - d.win.visibility = Window.Maximized + if(FluTools.isMacos()){ + if (d.win.visibility === Window.FullScreen) + d.win.visibility = Window.Windowed + else + d.win.visibility = Window.FullScreen + }else{ + if (d.win.visibility === Window.Maximized) + d.win.visibility = Window.Windowed + else + d.win.visibility = Window.Maximized + } } property var minClickListener: function(){ d.win.visibility = Window.Minimized diff --git a/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml b/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml index acf67722..37b85452 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml @@ -34,10 +34,17 @@ Rectangle{ property bool isMac: FluTools.isMacos() property color borerlessColor : FluTheme.primaryColor property var maxClickListener : function(){ - if (d.win.visibility === Window.Maximized) - d.win.visibility = Window.Windowed - else - d.win.visibility = Window.Maximized + if(FluTools.isMacos()){ + if (d.win.visibility === Window.FullScreen) + d.win.visibility = Window.Windowed + else + d.win.visibility = Window.FullScreen + }else{ + if (d.win.visibility === Window.Maximized) + d.win.visibility = Window.Windowed + else + d.win.visibility = Window.Maximized + } } property var minClickListener: function(){ d.win.visibility = Window.Minimized