update
parent
6db8c4d4ac
commit
88008e16be
|
@ -7,7 +7,7 @@ AppInfo::AppInfo(QObject *parent)
|
|||
: QObject{parent}
|
||||
{
|
||||
version("1.2.4");
|
||||
changeLang("En");
|
||||
lang(new En());
|
||||
}
|
||||
|
||||
void AppInfo::changeLang(const QString& locale){
|
||||
|
|
|
@ -16,6 +16,7 @@ int main(int argc, char *argv[])
|
|||
QCoreApplication::setApplicationName("FluentUI");
|
||||
QQuickStyle::setStyle("Basic");
|
||||
QGuiApplication app(argc, argv);
|
||||
app.setQuitOnLastWindowClosed(false);
|
||||
QQmlApplicationEngine engine;
|
||||
qmlRegisterType<ChatController>("Controller",1,0,"ChatController");
|
||||
AppInfo* appInfo = new AppInfo();
|
||||
|
|
|
@ -2,14 +2,16 @@
|
|||
import QtQuick.Window
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import "qrc:///global/"
|
||||
import Qt.labs.platform
|
||||
import FluentUI
|
||||
import "qrc:///global/"
|
||||
|
||||
FluWindow {
|
||||
id:rootwindow
|
||||
id:window
|
||||
width: 1000
|
||||
height: 640
|
||||
title: "FluentUI"
|
||||
closeDestory:false
|
||||
minimumWidth: 520
|
||||
minimumHeight: 460
|
||||
|
||||
|
@ -21,6 +23,18 @@ FluWindow {
|
|||
darkText: lang.dark_mode
|
||||
}
|
||||
|
||||
SystemTrayIcon {
|
||||
visible: true
|
||||
icon.source: "qrc:/res/image/favicon.ico"
|
||||
|
||||
onActivated: {
|
||||
window.show()
|
||||
window.raise()
|
||||
window.requestActivate()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FluNavigationView{
|
||||
id:nav_view
|
||||
anchors.fill: parent
|
||||
|
|
|
@ -67,7 +67,6 @@ Rectangle{
|
|||
height: root.height
|
||||
spacing: 0
|
||||
|
||||
|
||||
RowLayout{
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.rightMargin: 5
|
||||
|
|
|
@ -6,7 +6,6 @@ import FluentUI
|
|||
|
||||
ApplicationWindow {
|
||||
|
||||
|
||||
enum LaunchMode {
|
||||
Standard,
|
||||
SingleTask,
|
||||
|
@ -14,6 +13,7 @@ ApplicationWindow {
|
|||
}
|
||||
|
||||
default property alias content: container.data
|
||||
property bool closeDestory: true
|
||||
property int launchMode: FluWindow.Standard
|
||||
property string route
|
||||
property var argument:({})
|
||||
|
@ -50,8 +50,12 @@ ApplicationWindow {
|
|||
|
||||
onClosing:
|
||||
(event)=>{
|
||||
//销毁窗口,释放资源
|
||||
helper.destoryWindow()
|
||||
if(closeDestory){
|
||||
helper.destoryWindow()
|
||||
}else{
|
||||
visible = false
|
||||
event.accepted = false
|
||||
}
|
||||
}
|
||||
|
||||
FluInfoBar{
|
||||
|
|
Loading…
Reference in New Issue