diff --git a/src/FluApp.cpp b/src/FluApp.cpp index ef4e9761..788b7173 100644 --- a/src/FluApp.cpp +++ b/src/FluApp.cpp @@ -26,14 +26,6 @@ void FluApp::init(QObject *application){ FramelessHelper::Quick::initialize(); FramelessConfig::instance()->set(Global::Option::DisableLazyInitializationForMicaMaterial); FramelessConfig::instance()->set(Global::Option::CenterWindowBeforeShow); - FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur); - FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow); -#ifdef Q_OS_WIN - FramelessConfig::instance()->set(Global::Option::EnableBlurBehindWindow,false); -#endif -#ifdef Q_OS_MACOS - FramelessConfig::instance()->set(Global::Option::ForceNonNativeBackgroundBlur,false); -#endif QQmlEngine *engine = qmlEngine(_application); FramelessHelper::Quick::registerTypes(engine); } diff --git a/src/FluHttp.h b/src/FluHttp.h index 0a33711e..db36cb44 100644 --- a/src/FluHttp.h +++ b/src/FluHttp.h @@ -4,14 +4,20 @@ #include #include #include +#include #include #include "stdafx.h" class HttpRequest : public QObject{ Q_OBJECT Q_PROPERTY_AUTO(QString,url); +# if (QT_VERSION == QT_VERSION_CHECK(6, 4, 3)) + Q_PROPERTY_AUTO(QJsonValue,params); + Q_PROPERTY_AUTO(QJsonValue,headers); +# else Q_PROPERTY_AUTO(QVariant,params); Q_PROPERTY_AUTO(QVariant,headers); +# endif Q_PROPERTY_AUTO(QString,method); Q_PROPERTY_AUTO(QString,downloadSavePath); QML_NAMED_ELEMENT(HttpRequest) diff --git a/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml b/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml index 877a3acc..cbad52b7 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluMultilineTextBox.qml @@ -35,10 +35,9 @@ TextArea{ return placeholderNormalColor } selectByMouse: true - width: background.implicitWidth + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml b/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml index 175afa52..9f22eb10 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluPasswordBox.qml @@ -37,9 +37,9 @@ TextField{ return placeholderNormalColor } selectByMouse: true + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml b/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml index fd2749ae..f914a476 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluTextBox.qml @@ -46,9 +46,9 @@ TextField{ w = 0 return icon_end.visible ? w+36 : w+10 } + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt5/imports/FluentUI/Controls/FluToggleSwitch.qml b/src/Qt5/imports/FluentUI/Controls/FluToggleSwitch.qml index 522e87ea..b34f9ffa 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluToggleSwitch.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluToggleSwitch.qml @@ -46,8 +46,8 @@ Button { layoutDirection:control.textRight ? Qt.LeftToRight : Qt.RightToLeft Rectangle { id:control_backgound - width: background.width - height: background.height + implicitWidth: background.implicitWidth + implicitHeight: background.implicitHeight radius: height / 2 FluFocusRectangle{ visible: control.activeFocus diff --git a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml index 3c5717e2..924b7286 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluWindow.qml @@ -38,7 +38,6 @@ Window { } signal initArgument(var argument) id:window - flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint color:"transparent" onStayTopChanged: { d.changedStayTop() @@ -201,6 +200,7 @@ Window { FramelessHelper{ id:framless_helper onReady: { + flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint if(appBar){ var title_bar = loader_title_bar.item setTitleBarItem(title_bar) @@ -222,6 +222,19 @@ Window { } WindowBorder{ z:999 + visible: !FluTools.isLinux() + } + Rectangle{ + anchors.fill: parent + color: "#00000000" + border.width: 1 + visible: FluTools.isLinux() + border.color: { + if(window.active){ + return "#333333" + } + return "#999999" + } } function destoryOnClose(){ lifecycle.onDestoryOnClose() diff --git a/src/Qt6/imports/FluentUI/Controls/FluMultilineTextBox.qml b/src/Qt6/imports/FluentUI/Controls/FluMultilineTextBox.qml index 5bf243d0..455ff115 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluMultilineTextBox.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluMultilineTextBox.qml @@ -36,10 +36,9 @@ TextArea{ return placeholderNormalColor } selectByMouse: true - width: background.implicitWidth + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml b/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml index 66f7b915..e493a95c 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluPasswordBox.qml @@ -38,9 +38,9 @@ TextField{ return placeholderNormalColor } selectByMouse: true + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt6/imports/FluentUI/Controls/FluPopup.qml b/src/Qt6/imports/FluentUI/Controls/FluPopup.qml index 8f2a89be..355aea92 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluPopup.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluPopup.qml @@ -11,13 +11,6 @@ Popup { anchors.centerIn: Overlay.overlay closePolicy: Popup.CloseOnEscape enter: Transition { - NumberAnimation { - properties: "scale" - from:1.2 - to:1 - duration: FluTheme.enableAnimation ? 83 : 0 - easing.type: Easing.OutCubic - } NumberAnimation { property: "opacity" duration: FluTheme.enableAnimation ? 83 : 0 @@ -26,13 +19,6 @@ Popup { } } exit:Transition { - NumberAnimation { - properties: "scale" - from:1 - to:1.2 - duration: FluTheme.enableAnimation ? 83 : 0 - easing.type: Easing.OutCubic - } NumberAnimation { property: "opacity" duration: FluTheme.enableAnimation ? 83 : 0 diff --git a/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml b/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml index 9c00ecc0..7a3521a4 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluTextBox.qml @@ -47,9 +47,9 @@ TextField{ w = 0 return icon_end.visible ? w+36 : w+10 } + width: 240 background: FluTextBoxBackground{ inputItem: control - implicitWidth: 240 } Keys.onEnterPressed: (event)=> d.handleCommit(event) Keys.onReturnPressed:(event)=> d.handleCommit(event) diff --git a/src/Qt6/imports/FluentUI/Controls/FluToggleSwitch.qml b/src/Qt6/imports/FluentUI/Controls/FluToggleSwitch.qml index 005ff6c7..9a2f2869 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluToggleSwitch.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluToggleSwitch.qml @@ -47,8 +47,8 @@ Button { layoutDirection:control.textRight ? Qt.LeftToRight : Qt.RightToLeft Rectangle { id:control_backgound - width: background.width - height: background.height + implicitWidth: background.implicitWidth + implicitHeight: background.implicitHeight radius: height / 2 FluFocusRectangle{ visible: control.activeFocus diff --git a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml index f82f57ce..f7b6e148 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluWindow.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluWindow.qml @@ -37,7 +37,6 @@ Window { } signal initArgument(var argument) id:window - flags: Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint color:"transparent" onStayTopChanged: { d.changedStayTop() @@ -200,6 +199,7 @@ Window { FramelessHelper{ id:framless_helper onReady: { + flags = flags | Qt.Window | Qt.CustomizeWindowHint | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint if(appBar){ var title_bar = loader_title_bar.item setTitleBarItem(title_bar) @@ -221,6 +221,19 @@ Window { } WindowBorder{ z:999 + visible: !FluTools.isLinux() + } + Rectangle{ + anchors.fill: parent + color: "#00000000" + border.width: 1 + visible: FluTools.isLinux() + border.color: { + if(window.active){ + return "#333333" + } + return "#999999" + } } function destoryOnClose(){ lifecycle.onDestoryOnClose()