This commit is contained in:
朱子楚\zhuzi 2024-03-19 12:50:16 +08:00
parent 72cf0311c0
commit 89c183afd5
7 changed files with 60 additions and 59 deletions

View File

@ -535,104 +535,104 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml/window/MainWindow.qml" line="106"/>
<source>Quit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml/window/MainWindow.qml" line="99"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="99"/>
<location filename="qml/window/MainWindow.qml" line="100"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="103"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="103"/>
<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="106"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml/window/MainWindow.qml" line="107"/>
<location filename="qml/window/MainWindow.qml" line="351"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="117"/>
<location filename="qml/window/MainWindow.qml" line="118"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="214"/>
<location filename="qml/window/MainWindow.qml" line="215"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="224"/>
<location filename="qml/window/MainWindow.qml" line="225"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="315"/>
<location filename="qml/window/MainWindow.qml" line="316"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="316"/>
<location filename="qml/window/MainWindow.qml" line="317"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="317"/>
<location filename="qml/window/MainWindow.qml" line="318"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="324"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="324"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml/window/MainWindow.qml" line="348"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source> -- The current app version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source>
Now go and download the new version
@ -641,17 +641,17 @@ Updated content:
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="351"/>
<location filename="qml/window/MainWindow.qml" line="352"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="378"/>
<location filename="qml/window/MainWindow.qml" line="379"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="385"/>
<location filename="qml/window/MainWindow.qml" line="386"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>

View File

@ -535,104 +535,104 @@
<context>
<name>MainWindow</name>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<source>Dark Mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="97"/>
<location filename="qml/window/MainWindow.qml" line="105"/>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml/window/MainWindow.qml" line="106"/>
<source>Quit</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="98"/>
<location filename="qml/window/MainWindow.qml" line="99"/>
<source>Are you sure you want to exit the program?</source>
<translation type="unfinished">退</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="99"/>
<location filename="qml/window/MainWindow.qml" line="100"/>
<source>Minimize</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="103"/>
<source>Friendly Reminder</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="102"/>
<location filename="qml/window/MainWindow.qml" line="103"/>
<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="106"/>
<location filename="qml/window/MainWindow.qml" line="350"/>
<location filename="qml/window/MainWindow.qml" line="107"/>
<location filename="qml/window/MainWindow.qml" line="351"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="117"/>
<location filename="qml/window/MainWindow.qml" line="118"/>
<source>Open in Separate Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="214"/>
<location filename="qml/window/MainWindow.qml" line="215"/>
<source>Click Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="224"/>
<location filename="qml/window/MainWindow.qml" line="225"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="315"/>
<location filename="qml/window/MainWindow.qml" line="316"/>
<source>Finish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="316"/>
<location filename="qml/window/MainWindow.qml" line="317"/>
<source>Next</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="317"/>
<location filename="qml/window/MainWindow.qml" line="318"/>
<source>Previous</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="321"/>
<location filename="qml/window/MainWindow.qml" line="322"/>
<source>Here you can switch to night mode.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="324"/>
<source>Hide Easter eggs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="323"/>
<location filename="qml/window/MainWindow.qml" line="324"/>
<source>Try a few more clicks!!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="347"/>
<location filename="qml/window/MainWindow.qml" line="348"/>
<source>Upgrade Tips</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source>FluentUI is currently up to date </source>
<translation type="unfinished">FluentUI </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source> -- The current app version</source>
<translation type="unfinished"> -- </translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="348"/>
<location filename="qml/window/MainWindow.qml" line="349"/>
<source>
Now go and download the new version
@ -645,17 +645,17 @@ Updated content:
</translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="351"/>
<location filename="qml/window/MainWindow.qml" line="352"/>
<source>OK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="378"/>
<location filename="qml/window/MainWindow.qml" line="379"/>
<source>The current version is already the latest</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="qml/window/MainWindow.qml" line="385"/>
<location filename="qml/window/MainWindow.qml" line="386"/>
<source>The network is abnormal</source>
<translation type="unfinished"></translation>
</message>

View File

@ -21,6 +21,7 @@ FluWindow {
launchMode: FluWindowType.SingleTask
fitsAppBarWindows: true
appBar: FluAppBar {
width: window.width
height: 30
showDark: true
darkClickListener:(button)=>handleDarkChanged(button)

View File

@ -76,7 +76,6 @@ void FluApp::navigate(const QString& route,const QJsonObject& argument,FluWindow
if(windowRegister){
windowRegister->to(win);
}
win->setColor(QColor(Qt::transparent));
}
void FluApp::exit(int retCode){

View File

@ -340,7 +340,13 @@ void FluFramelessHelper::componentComplete(){
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME);
}else{
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME);
for (int i = 0; i < qApp->screens().count(); ++i) {
connect( qApp->screens().at(i),&QScreen::logicalDotsPerInchChanged,this,[=]{
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_FRAMECHANGED);
});
}
}
SetWindowPos(hwnd,nullptr,0,0,0,0,SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
#else
window->setFlags((window->flags() & (~Qt::WindowMinMaxButtonsHint) & (~Qt::Dialog)) | Qt::FramelessWindowHint | Qt::Window);
window->installEventFilter(this);
@ -351,8 +357,7 @@ void FluFramelessHelper::componentComplete(){
window->setMaximumSize(QSize(w,h));
window->setMinimumSize(QSize(w,h));
}
window->setWidth(w);
window->setHeight(h);
window->resize(QSize(w,h));
_onStayTopChange();
_stayTop.connectNotifySignal(this,SLOT(_onStayTopChange()));
_screen.connectNotifySignal(this,SLOT(_onScreenChanged()));

View File

@ -16,6 +16,7 @@ Window {
property Item appBar: FluAppBar {
title: window.title
height: 30
width: window.width
showDark: window.showDark
showClose: window.showClose
showMinimize: window.showMinimize
@ -101,9 +102,6 @@ Window {
}
lifecycle.onVisible(visible)
}
onWidthChanged: {
window.appBar.width = width
}
QtObject{
id:d
property bool isFirstVisible: true

View File

@ -15,6 +15,7 @@ Window {
property Item appBar: FluAppBar {
title: window.title
height: 30
width: window.width
showDark: window.showDark
showClose: window.showClose
showMinimize: window.showMinimize
@ -100,9 +101,6 @@ Window {
}
lifecycle.onVisible(visible)
}
onWidthChanged: {
window.appBar.width = width
}
QtObject{
id:d
property bool isFirstVisible: true