mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 03:10:10 +08:00
update
This commit is contained in:
parent
661529f1f4
commit
35921ed900
@ -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);
|
||||
}
|
||||
|
@ -4,14 +4,20 @@
|
||||
#include <QObject>
|
||||
#include <QtQml/qqml.h>
|
||||
#include <QFile>
|
||||
#include <QJsonValue>
|
||||
#include <QNetworkAccessManager>
|
||||
#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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user