This commit is contained in:
朱子楚\zhuzi 2024-04-17 15:11:14 +08:00
parent c9c737f2fc
commit 1a0f2afee0
6 changed files with 72 additions and 63 deletions

View File

@ -551,104 +551,104 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="83"/>
<location filename="qml/window/MainWindow.qml" line="91"/>
<location filename="qml/window/MainWindow.qml" line="87"/>
<location filename="qml/window/MainWindow.qml" line="95"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="84"/>
<location filename="qml/window/MainWindow.qml" line="88"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="85"/>
<location filename="qml/window/MainWindow.qml" line="89"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="88"/>
<location filename="qml/window/MainWindow.qml" line="92"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="88"/>
<location filename="qml/window/MainWindow.qml" line="92"/>
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="92"/>
<location filename="qml/window/MainWindow.qml" line="336"/>
<location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="340"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="103"/>
<location filename="qml/window/MainWindow.qml" line="107"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="200"/>
<location filename="qml/window/MainWindow.qml" line="204"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="210"/>
<location filename="qml/window/MainWindow.qml" line="214"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="301"/>
<location filename="qml/window/MainWindow.qml" line="305"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="302"/>
<location filename="qml/window/MainWindow.qml" line="306"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="303"/>
<location filename="qml/window/MainWindow.qml" line="307"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="307"/>
<location filename="qml/window/MainWindow.qml" line="311"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="307"/>
<location filename="qml/window/MainWindow.qml" line="311"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="309"/>
<location filename="qml/window/MainWindow.qml" line="313"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="309"/>
<location filename="qml/window/MainWindow.qml" line="313"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="333"/>
<location filename="qml/window/MainWindow.qml" line="337"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source> -- The current app version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source>
Now go and download the new version
@ -657,17 +657,17 @@ Updated content:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="337"/>
<location filename="qml/window/MainWindow.qml" line="341"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="364"/>
<location filename="qml/window/MainWindow.qml" line="368"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="371"/>
<location filename="qml/window/MainWindow.qml" line="375"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>
@ -1343,22 +1343,22 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Home</name>
<message>
<location filename="qml/page/T_Home.qml" line="23"/>
<location filename="qml/page/T_Home.qml" line="19"/>
<source>FluentUI GitHub</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="24"/>
<location filename="qml/page/T_Home.qml" line="20"/>
<source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="32"/>
<location filename="qml/page/T_Home.qml" line="28"/>
<source>FluentUI Initializr</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="33"/>
<location filename="qml/page/T_Home.qml" line="29"/>
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
<translation type="unfinished"></translation>
</message>

View File

@ -551,104 +551,104 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="307"/>
<location filename="qml/window/MainWindow.qml" line="311"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="83"/>
<location filename="qml/window/MainWindow.qml" line="91"/>
<location filename="qml/window/MainWindow.qml" line="87"/>
<location filename="qml/window/MainWindow.qml" line="95"/>
<source>Quit</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="84"/>
<location filename="qml/window/MainWindow.qml" line="88"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="85"/>
<location filename="qml/window/MainWindow.qml" line="89"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="88"/>
<location filename="qml/window/MainWindow.qml" line="92"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="88"/>
<location filename="qml/window/MainWindow.qml" line="92"/>
<source>FluentUI is hidden from the tray, click on the tray to activate the window again</source>
<translation type="unfinished">FluentUI </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="92"/>
<location filename="qml/window/MainWindow.qml" line="336"/>
<location filename="qml/window/MainWindow.qml" line="96"/>
<location filename="qml/window/MainWindow.qml" line="340"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="103"/>
<location filename="qml/window/MainWindow.qml" line="107"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="200"/>
<location filename="qml/window/MainWindow.qml" line="204"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="210"/>
<location filename="qml/window/MainWindow.qml" line="214"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="301"/>
<location filename="qml/window/MainWindow.qml" line="305"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="302"/>
<location filename="qml/window/MainWindow.qml" line="306"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="303"/>
<location filename="qml/window/MainWindow.qml" line="307"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="307"/>
<location filename="qml/window/MainWindow.qml" line="311"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="309"/>
<location filename="qml/window/MainWindow.qml" line="313"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="309"/>
<location filename="qml/window/MainWindow.qml" line="313"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="333"/>
<location filename="qml/window/MainWindow.qml" line="337"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished">FluentUI </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source> -- The current app version</source>
<translation type="unfinished"> -- </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="334"/>
<location filename="qml/window/MainWindow.qml" line="338"/>
<source>
Now go and download the new version
@ -661,17 +661,17 @@ Updated content:
</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="337"/>
<location filename="qml/window/MainWindow.qml" line="341"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="364"/>
<location filename="qml/window/MainWindow.qml" line="368"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="371"/>
<location filename="qml/window/MainWindow.qml" line="375"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>
@ -1393,22 +1393,22 @@ My only desire is to be permitted to drive out the traitors and restore the Han.
<context>
<name>T_Home</name>
<message>
<location filename="qml/page/T_Home.qml" line="23"/>
<location filename="qml/page/T_Home.qml" line="19"/>
<source>FluentUI GitHub</source>
<translation type="unfinished">FluentUI GitHub</translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="24"/>
<location filename="qml/page/T_Home.qml" line="20"/>
<source>The latest FluentUI controls and styles for your applications.</source>
<translation type="unfinished"> FluentUI </translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="32"/>
<location filename="qml/page/T_Home.qml" line="28"/>
<source>FluentUI Initializr</source>
<translation type="unfinished">FluentUI脚手架</translation>
</message>
<message>
<location filename="qml/page/T_Home.qml" line="33"/>
<location filename="qml/page/T_Home.qml" line="29"/>
<source>FluentUI Initializr is a Tool that helps you create and customize Fluent UI projects with various options.</source>
<translation type="unfinished">FluentUI Fluent UI </translation>
</message>

View File

@ -12,10 +12,6 @@ FluScrollablePage{
animationEnabled: false
header: Item{}
FluentInitializrWindow{
id:fluent_Initializr
}
ListModel{
id: model_header
ListElement{

View File

@ -15,7 +15,7 @@ FluWindow {
title: "FluentUI"
width: 1000
height: 680
minimumWidth: 520
minimumWidth: 1000
minimumHeight: 200
launchMode: FluWindowType.SingleTask
fitsAppBarWindows: true
@ -28,6 +28,10 @@ FluWindow {
z:7
}
FluentInitializrWindow{
id:fluent_Initializr
}
FluEvent{
name: "checkUpdate"
onTriggered: {

View File

@ -67,6 +67,8 @@ void FluFrameless::componentComplete() {
if (_disabled) {
return;
}
int w = window()->width();
int h = window()->height();
_current = window()->winId();
window()->setFlags((window()->flags()) | Qt::CustomizeWindowHint | Qt::WindowMinimizeButtonHint | Qt::WindowCloseButtonHint | Qt::FramelessWindowHint);
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
@ -107,6 +109,12 @@ void FluFrameless::componentComplete() {
::RedrawWindow(hwnd, nullptr, nullptr, RDW_INVALIDATE | RDW_UPDATENOW);
});
#endif
h = h + _appbar->height();
if(_fixSize){
window()->setMaximumSize(QSize(w,h));
window()->setMinimumSize(QSize(w,h));
}
window()->resize(QSize(w,h));
connect(this, &FluFrameless::topmostChanged, this, [this] {
_setWindowTopmost(topmost());
});

View File

@ -3,6 +3,7 @@
#include <QObject>
#include <QQuickItem>
#include <QAbstractNativeEventFilter>
#include <QQmlProperty>
#include "stdafx.h"
#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))