This commit is contained in:
朱子楚\zhuzi
2023-11-23 19:58:54 +08:00
parent 35d85aa801
commit 2f3ed2bd0f
11 changed files with 50 additions and 3 deletions

View File

@ -14,8 +14,10 @@
FRAMELESSHELPER_USE_NAMESPACE
FluApp::FluApp(QObject *parent):QObject{parent}{
connect(this,&FluApp::useSystemAppBarChanged,this,[=]{FramelessConfig::instance()->set(Global::Option::UseSystemAppBar,_useSystemAppBar);});
vsync(true);
httpInterceptor(nullptr);
useSystemAppBar(false);
}
FluApp::~FluApp(){

View File

@ -23,6 +23,7 @@ class FluApp : public QObject
Q_PROPERTY_AUTO(QString,initialRoute);
Q_PROPERTY_AUTO(QJsonObject,routes);
Q_PROPERTY_AUTO(FluHttpInterceptor*,httpInterceptor);
Q_PROPERTY_AUTO(bool,useSystemAppBar);
QML_NAMED_ELEMENT(FluApp)
QML_SINGLETON
private:

View File

@ -38,7 +38,7 @@ Window {
property bool showMinimize: true
property bool showMaximize: true
property bool showStayTop: true
property bool useSystemAppBar: false
property bool useSystemAppBar
property var closeListener: function(event){
if(closeDestory){
destoryOnClose()
@ -58,6 +58,7 @@ Window {
d.changedStayTop()
}
Component.onCompleted: {
useSystemAppBar = FluApp.useSystemAppBar
lifecycle.onCompleted(window)
initArgument(argument)
d.changedStayTop()

View File

@ -37,7 +37,7 @@ Window {
property bool showMinimize: true
property bool showMaximize: true
property bool showStayTop: true
property bool useSystemAppBar: false
property bool useSystemAppBar
property var closeListener: function(event){
if(closeDestory){
destoryOnClose()
@ -57,6 +57,7 @@ Window {
d.changedStayTop()
}
Component.onCompleted: {
useSystemAppBar = FluApp.useSystemAppBar
lifecycle.onCompleted(window)
initArgument(argument)
d.changedStayTop()