mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 03:10:10 +08:00
update
This commit is contained in:
parent
3c924bb0de
commit
6974b0efa6
@ -30,6 +30,7 @@ Item {
|
||||
param.addHeader("Token","000000000000000000000")
|
||||
})
|
||||
FluApp.init(app)
|
||||
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||
FluApp.vsync = SettingsHelper.getVsync()
|
||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||
|
@ -191,7 +191,12 @@ FluWindow {
|
||||
pageMode: FluNavigationViewType.NoStack
|
||||
items: ItemsOriginal
|
||||
footerItems:ItemsFooter
|
||||
topPadding:FluTools.isMacos() ? 20 : 0
|
||||
topPadding:{
|
||||
if(window.useSystemAppBar){
|
||||
return 0
|
||||
}
|
||||
return FluTools.isMacos() ? 20 : 0
|
||||
}
|
||||
displayMode:viewmodel_settings.displayMode
|
||||
logo: "qrc:/example/res/image/favicon.ico"
|
||||
title:"FluentUI"
|
||||
|
@ -30,6 +30,7 @@ Item {
|
||||
param.addHeader("Token","000000000000000000000")
|
||||
})
|
||||
FluApp.init(app)
|
||||
FluApp.windowIcon = "qrc:/example/res/image/favicon.ico"
|
||||
FluApp.useSystemAppBar = SettingsHelper.getUseSystemAppBar()
|
||||
FluApp.vsync = SettingsHelper.getVsync()
|
||||
FluTheme.darkMode = SettingsHelper.getDarkMode()
|
||||
|
@ -194,7 +194,12 @@ FluWindow {
|
||||
pageMode: FluNavigationViewType.NoStack
|
||||
items: ItemsOriginal
|
||||
footerItems:ItemsFooter
|
||||
topPadding:FluTools.isMacos() ? 20 : 0
|
||||
topPadding:{
|
||||
if(window.useSystemAppBar){
|
||||
return 0
|
||||
}
|
||||
return FluTools.isMacos() ? 20 : 0
|
||||
}
|
||||
displayMode:viewmodel_settings.displayMode
|
||||
logo: "qrc:/example/res/image/favicon.ico"
|
||||
title:"FluentUI"
|
||||
|
@ -22,6 +22,7 @@ class FluApp : public QObject
|
||||
Q_PROPERTY_AUTO(QString,initialRoute);
|
||||
Q_PROPERTY_AUTO(QJsonObject,routes);
|
||||
Q_PROPERTY_AUTO(bool,useSystemAppBar);
|
||||
Q_PROPERTY_AUTO(QString,windowIcon);
|
||||
QML_NAMED_ELEMENT(FluApp)
|
||||
QML_SINGLETON
|
||||
private:
|
||||
|
@ -175,3 +175,7 @@ QPoint FluTools::cursorPos(){
|
||||
qint64 FluTools::currentTimestamp(){
|
||||
return QDateTime::currentMSecsSinceEpoch();
|
||||
}
|
||||
|
||||
QIcon FluTools::windowIcon(){
|
||||
return QGuiApplication::windowIcon();
|
||||
}
|
||||
|
@ -49,6 +49,7 @@ public:
|
||||
Q_INVOKABLE bool isSoftware();
|
||||
Q_INVOKABLE qint64 currentTimestamp();
|
||||
Q_INVOKABLE QPoint cursorPos();
|
||||
Q_INVOKABLE QIcon windowIcon();
|
||||
};
|
||||
|
||||
#endif // FLUTOOLS_H
|
||||
|
@ -6,6 +6,7 @@ import FluentUI 1.0
|
||||
|
||||
Window {
|
||||
default property alias content: container.data
|
||||
property string windowIcon: FluApp.windowIcon
|
||||
property bool closeDestory: true
|
||||
property int launchMode: FluWindowType.Standard
|
||||
property var argument:({})
|
||||
@ -22,6 +23,7 @@ Window {
|
||||
showMinimize: window.showMinimize
|
||||
showMaximize: window.showMaximize
|
||||
showStayTop: window.showStayTop
|
||||
icon: window.windowIcon
|
||||
}
|
||||
property color backgroundColor: {
|
||||
if(active){
|
||||
@ -52,6 +54,7 @@ Window {
|
||||
signal initArgument(var argument)
|
||||
signal firstVisible()
|
||||
id:window
|
||||
flags: Qt.Window | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||
maximumWidth: fixSize ? width : 16777215
|
||||
maximumHeight: fixSize ? height : 16777215
|
||||
minimumWidth: fixSize ? width : 0
|
||||
|
@ -5,6 +5,7 @@ import FluentUI
|
||||
|
||||
Window {
|
||||
default property alias content: container.data
|
||||
property string windowIcon: FluApp.windowIcon
|
||||
property bool closeDestory: true
|
||||
property int launchMode: FluWindowType.Standard
|
||||
property var argument:({})
|
||||
@ -21,6 +22,7 @@ Window {
|
||||
showMinimize: window.showMinimize
|
||||
showMaximize: window.showMaximize
|
||||
showStayTop: window.showStayTop
|
||||
icon: window.windowIcon
|
||||
}
|
||||
property color backgroundColor: {
|
||||
if(active){
|
||||
@ -51,6 +53,7 @@ Window {
|
||||
signal initArgument(var argument)
|
||||
signal firstVisible()
|
||||
id:window
|
||||
flags: Qt.Window | Qt.WindowTitleHint | Qt.WindowSystemMenuHint | Qt.WindowMinMaxButtonsHint | Qt.WindowCloseButtonHint
|
||||
maximumWidth: fixSize ? width : 16777215
|
||||
maximumHeight: fixSize ? height : 16777215
|
||||
minimumWidth: fixSize ? width : 0
|
||||
|
Loading…
Reference in New Issue
Block a user