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

View File

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

View File

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

View File

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

View File

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

View File

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