From 2b528a7072d7072dc04bb6d54bd42ca030dd0750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=AD=90=E6=A5=9A=5Czhuzi?= Date: Fri, 14 Jun 2024 17:28:31 +0800 Subject: [PATCH] update --- example/src/main.cpp | 3 --- src/Qt6/imports/FluentUI/Controls/FluAppBar.qml | 6 +++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/example/src/main.cpp b/example/src/main.cpp index bd80267c..21cc3f78 100644 --- a/example/src/main.cpp +++ b/example/src/main.cpp @@ -59,9 +59,6 @@ int main(int argc, char *argv[]) QGuiApplication::setQuitOnLastWindowClosed(false); SettingsHelper::getInstance()->init(argv); Log::setup(argv,uri); -#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)) - QQuickWindow::setGraphicsApi(QSGRendererInterface::OpenGL); -#endif #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); diff --git a/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml b/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml index 8e4b6f13..6c8ba83c 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluAppBar.qml @@ -43,12 +43,12 @@ Rectangle{ property alias layoutStandardbuttons: layout_standard_buttons property var maxClickListener : function(){ if(FluTools.isMacos()){ - if (d.win.visibility === Window.FullScreen) + if (d.win.visibility === Window.FullScreen || d.win.visibility === Window.Maximized) d.win.showNormal() else d.win.showFullScreen() }else{ - if (d.win.visibility === Window.Maximized) + if (d.win.visibility === Window.Maximized || d.win.visibility === Window.FullScreen) d.win.showNormal() else d.win.showMaximized() @@ -93,7 +93,7 @@ Rectangle{ } return false } - property bool isRestore: win && Window.Maximized === win.visibility + property bool isRestore: win && (Window.Maximized === win.visibility || Window.FullScreen === win.visibility) property bool resizable: win && !(win.height === win.maximumHeight && win.height === win.minimumHeight && win.width === win.maximumWidth && win.width === win.minimumWidth) function containsPointToItem(point,item){ var pos = item.mapToGlobal(0,0)