mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
update
This commit is contained in:
parent
155307fe6a
commit
649edbea0d
@ -607,104 +607,104 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="86"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="94"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<source>Are you sure you want to exit the program?</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="89"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<source>Minimize</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<source>Friendly Reminder</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<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="96"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="339"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="107"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="106"/>
|
||||
<source>Open in Separate Window</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="204"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="203"/>
|
||||
<source>Click Time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="214"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="213"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="304"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="310"/>
|
||||
<source>Dark Mode</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="310"/>
|
||||
<source>Here you can switch to night mode.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="312"/>
|
||||
<source>Hide Easter eggs</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="312"/>
|
||||
<source>Try a few more clicks!!</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="336"/>
|
||||
<source>Upgrade Tips</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>FluentUI is currently up to date </source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source> -- The current app version</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>
|
||||
Now go and download the new version?
|
||||
|
||||
@ -713,17 +713,17 @@ Updated content:
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="341"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="368"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="367"/>
|
||||
<source>The current version is already the latest</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="375"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="374"/>
|
||||
<source>The network is abnormal</source>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
|
@ -611,104 +611,104 @@
|
||||
<context>
|
||||
<name>MainWindow</name>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="310"/>
|
||||
<source>Dark Mode</source>
|
||||
<translation type="unfinished">夜间模式</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="86"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="94"/>
|
||||
<source>Quit</source>
|
||||
<translation type="unfinished">退出</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||
<source>Are you sure you want to exit the program?</source>
|
||||
<translation type="unfinished">您确定要退出程序吗</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="89"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="88"/>
|
||||
<source>Minimize</source>
|
||||
<translation type="unfinished">最小化</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<source>Friendly Reminder</source>
|
||||
<translation type="unfinished">友情提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="92"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="91"/>
|
||||
<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="96"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="95"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="339"/>
|
||||
<source>Cancel</source>
|
||||
<translation type="unfinished">取消</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="107"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="106"/>
|
||||
<source>Open in Separate Window</source>
|
||||
<translation type="unfinished">在独立窗口中打开</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="204"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="203"/>
|
||||
<source>Click Time</source>
|
||||
<translation type="unfinished">点击次数</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="214"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="213"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished">搜索</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="304"/>
|
||||
<source>Finish</source>
|
||||
<translation type="unfinished">完成</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="305"/>
|
||||
<source>Next</source>
|
||||
<translation type="unfinished">下一步</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="307"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="306"/>
|
||||
<source>Previous</source>
|
||||
<translation type="unfinished">上一步</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="311"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="310"/>
|
||||
<source>Here you can switch to night mode.</source>
|
||||
<translation type="unfinished">在这里,您可以切换到夜间模式。</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="312"/>
|
||||
<source>Hide Easter eggs</source>
|
||||
<translation type="unfinished">隐藏彩蛋</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="313"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="312"/>
|
||||
<source>Try a few more clicks!!</source>
|
||||
<translation type="unfinished">再试几下!!</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="336"/>
|
||||
<source>Upgrade Tips</source>
|
||||
<translation type="unfinished">升级提示</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>FluentUI is currently up to date </source>
|
||||
<translation type="unfinished">FluentUI 目前最新版本 </translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source> -- The current app version</source>
|
||||
<translation type="unfinished"> -- 当前应用版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="337"/>
|
||||
<source>
|
||||
Now go and download the new version?
|
||||
|
||||
@ -721,17 +721,17 @@ Updated content:
|
||||
</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="341"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
||||
<source>OK</source>
|
||||
<translation type="unfinished">确定</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="368"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="367"/>
|
||||
<source>The current version is already the latest</source>
|
||||
<translation type="unfinished">当前版本已经是最新版本</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="qml/window/MainWindow.qml" line="375"/>
|
||||
<location filename="qml/window/MainWindow.qml" line="374"/>
|
||||
<source>The network is abnormal</source>
|
||||
<translation type="unfinished">网络异常</translation>
|
||||
</message>
|
||||
|
@ -20,7 +20,6 @@ FluWindow {
|
||||
launchMode: FluWindowType.SingleTask
|
||||
fitsAppBarWindows: true
|
||||
appBar: FluAppBar {
|
||||
width: window.width
|
||||
height: 30
|
||||
showDark: true
|
||||
darkClickListener:(button)=>handleDarkChanged(button)
|
||||
|
@ -108,14 +108,14 @@ void FluFrameless::componentComplete() {
|
||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||
if (_fixSize) {
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME);;
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION);;
|
||||
for (int i = 0; i <= QGuiApplication::screens().count() - 1; ++i) {
|
||||
connect(QGuiApplication::screens().at(i), &QScreen::logicalDotsPerInchChanged, this, [=] {
|
||||
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_FRAMECHANGED);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME);
|
||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CAPTION);
|
||||
}
|
||||
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||
connect(window(), &QQuickWindow::screenChanged, this, [hwnd] {
|
||||
@ -168,30 +168,11 @@ void FluFrameless::componentComplete() {
|
||||
}
|
||||
return false;
|
||||
} else if (uMsg == WM_NCCALCSIZE && wParam == TRUE) {
|
||||
const auto clientRect = ((wParam == FALSE) ? reinterpret_cast<LPRECT>(lParam) : &(reinterpret_cast<LPNCCALCSIZE_PARAMS>(lParam))->rgrc[0]);
|
||||
const LONG originalTop = clientRect->top;
|
||||
const LONG originalLeft = clientRect->left;
|
||||
const LONG originalRight = clientRect->right;
|
||||
const LONG originalBottom = clientRect->bottom;
|
||||
const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam);
|
||||
if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
|
||||
*result = hitTestResult;
|
||||
return true;
|
||||
}
|
||||
bool isMaximum = ::IsZoomed(hwnd);
|
||||
if (isMaximum) {
|
||||
auto geometry = window()->screen()->geometry();
|
||||
auto offsetX = qAbs(geometry.left() - originalLeft);
|
||||
auto offsetY = qAbs(geometry.top() - originalTop);
|
||||
clientRect->top = originalTop + offsetY;
|
||||
clientRect->bottom = originalBottom - offsetY;
|
||||
clientRect->left = originalLeft + offsetX;
|
||||
clientRect->right = originalRight - offsetX;
|
||||
window()->setProperty("__margins",7);
|
||||
}else{
|
||||
clientRect->top = originalTop;
|
||||
clientRect->bottom = originalBottom;
|
||||
clientRect->left = originalLeft;
|
||||
clientRect->right = originalRight;
|
||||
window()->setProperty("__margins",0);
|
||||
}
|
||||
_setMaximizeHovered(false);
|
||||
*result = WVR_REDRAW;
|
||||
@ -251,7 +232,7 @@ void FluFrameless::componentComplete() {
|
||||
return true;
|
||||
} else if (uMsg == WM_NCPAINT) {
|
||||
*result = FALSE;
|
||||
return true;
|
||||
return false;
|
||||
} else if (uMsg == WM_NCACTIVATE) {
|
||||
*result = TRUE;
|
||||
return true;
|
||||
|
@ -16,7 +16,6 @@ Window {
|
||||
property Item appBar: FluAppBar {
|
||||
title: window.title
|
||||
height: 30
|
||||
width: window.width
|
||||
showDark: window.showDark
|
||||
showClose: window.showClose
|
||||
showMinimize: window.showMinimize
|
||||
@ -41,6 +40,7 @@ Window {
|
||||
property bool autoCenter: true
|
||||
property bool autoDestroy: true
|
||||
property bool useSystemAppBar
|
||||
property int __margins: 0
|
||||
property color resizeBorderColor: {
|
||||
if(window.active){
|
||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||
@ -174,6 +174,11 @@ Window {
|
||||
id:com_app_bar
|
||||
Item{
|
||||
data: window.appBar
|
||||
Component.onCompleted: {
|
||||
window.appBar.width = Qt.binding(function(){
|
||||
return this.parent.width
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Component{
|
||||
@ -246,6 +251,10 @@ Window {
|
||||
border.color: window.resizeBorderColor
|
||||
}
|
||||
}
|
||||
Item{
|
||||
id: layout_container
|
||||
anchors.fill: parent
|
||||
anchors.margins: window.__margins
|
||||
FluLoader{
|
||||
anchors.fill: parent
|
||||
sourceComponent: background
|
||||
@ -283,8 +292,9 @@ Window {
|
||||
}
|
||||
FluInfoBar{
|
||||
id:info_bar
|
||||
root: window
|
||||
root: layout_container
|
||||
}
|
||||
|
||||
FluLoader{
|
||||
id:loader_border
|
||||
anchors.fill: parent
|
||||
@ -295,6 +305,7 @@ Window {
|
||||
return com_border
|
||||
}
|
||||
}
|
||||
}
|
||||
function hideLoading(){
|
||||
loader_loading.sourceComponent = undefined
|
||||
}
|
||||
@ -325,9 +336,6 @@ Window {
|
||||
window.minimumHeight = window.height
|
||||
}
|
||||
}
|
||||
function registerForWindowResult(path){
|
||||
return FluApp.createWindowRegister(window,path)
|
||||
}
|
||||
function setResult(data){
|
||||
if(_windowRegister){
|
||||
_windowRegister.setResult(data)
|
||||
|
@ -15,7 +15,6 @@ Window {
|
||||
property Item appBar: FluAppBar {
|
||||
title: window.title
|
||||
height: 30
|
||||
width: window.width
|
||||
showDark: window.showDark
|
||||
showClose: window.showClose
|
||||
showMinimize: window.showMinimize
|
||||
@ -40,6 +39,7 @@ Window {
|
||||
property bool autoCenter: true
|
||||
property bool autoDestroy: true
|
||||
property bool useSystemAppBar
|
||||
property int __margins: 0
|
||||
property color resizeBorderColor: {
|
||||
if(window.active){
|
||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||
@ -173,6 +173,11 @@ Window {
|
||||
id:com_app_bar
|
||||
Item{
|
||||
data: window.appBar
|
||||
Component.onCompleted: {
|
||||
window.appBar.width = Qt.binding(function(){
|
||||
return this.parent.width
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
Component{
|
||||
@ -245,6 +250,10 @@ Window {
|
||||
border.color: window.resizeBorderColor
|
||||
}
|
||||
}
|
||||
Item{
|
||||
id: layout_container
|
||||
anchors.fill: parent
|
||||
anchors.margins: window.__margins
|
||||
FluLoader{
|
||||
anchors.fill: parent
|
||||
sourceComponent: background
|
||||
@ -282,8 +291,9 @@ Window {
|
||||
}
|
||||
FluInfoBar{
|
||||
id:info_bar
|
||||
root: window
|
||||
root: layout_container
|
||||
}
|
||||
|
||||
FluLoader{
|
||||
id:loader_border
|
||||
anchors.fill: parent
|
||||
@ -294,6 +304,7 @@ Window {
|
||||
return com_border
|
||||
}
|
||||
}
|
||||
}
|
||||
function hideLoading(){
|
||||
loader_loading.sourceComponent = undefined
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user