diff --git a/example/qml-Qt6/window/MainWindow.qml b/example/qml-Qt6/window/MainWindow.qml index 17b6b7b9..b7d76df2 100644 --- a/example/qml-Qt6/window/MainWindow.qml +++ b/example/qml-Qt6/window/MainWindow.qml @@ -254,7 +254,7 @@ FluWindow { } function handleDarkChanged(button){ - if(FluTools.isMacos() || !FluTheme.enableAnimation){ + if(!FluTheme.enableAnimation){ changeDark() }else{ loader_reveal.sourceComponent = com_reveal diff --git a/example/qml/window/MainWindow.qml b/example/qml/window/MainWindow.qml index a6c02b1a..4e7e4740 100644 --- a/example/qml/window/MainWindow.qml +++ b/example/qml/window/MainWindow.qml @@ -257,7 +257,7 @@ FluWindow { } function handleDarkChanged(button){ - if(FluTools.isMacos() || !FluTheme.enableAnimation){ + if(!FluTheme.enableAnimation){ changeDark() }else{ loader_reveal.sourceComponent = com_reveal diff --git a/framelesshelper b/framelesshelper index 125da5c8..80f869ad 160000 --- a/framelesshelper +++ b/framelesshelper @@ -1 +1 @@ -Subproject commit 125da5c8e1ab37ce87c863c7c336a27bf64cec54 +Subproject commit 80f869adcaf7db76ba8088f2c16382dcd5feaafb diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 48bbdb3b..8afdf732 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -14,6 +14,7 @@ Window { property bool fixSize: false property Component loadingItem: com_loading property var appBar: com_app_bar + flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint property color backgroundColor: { if(active){ return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1) @@ -48,14 +49,19 @@ Window { onVisibleChanged: { lifecycle.onVisible(visible) } + onVisibilityChanged: { + console.debug(visibility) + } QtObject{ id:d function changedStayTop(){ + var visibility = window.visibility if(window.stayTop){ window.flags = window.flags | Qt.WindowStaysOnTopHint }else{ window.flags = window.flags &~ Qt.WindowStaysOnTopHint } + window.visibility = visibility } } Connections{ diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index 300ef848..3584274e 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -13,6 +13,7 @@ Window { property bool fixSize: false property Component loadingItem: com_loading property var appBar: com_app_bar + flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint property color backgroundColor: { if(active){ return FluTheme.dark ? Qt.rgba(26/255,34/255,40/255,1) : Qt.rgba(243/255,243/255,243/255,1) @@ -47,14 +48,19 @@ Window { onVisibleChanged: { lifecycle.onVisible(visible) } + onVisibilityChanged: { + console.debug(visibility) + } QtObject{ id:d function changedStayTop(){ + var visibility = window.visibility if(window.stayTop){ window.flags = window.flags | Qt.WindowStaysOnTopHint }else{ window.flags = window.flags &~ Qt.WindowStaysOnTopHint } + window.visibility = visibility } } Connections{