mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-25 04:05:51 +08:00
Compare commits
No commits in common. "fdaaa85541b7dab3445ad7ea005cc021341ce0fb" and "155307fe6a6a1006a59022fd547fb75eec853d3e" have entirely different histories.
fdaaa85541
...
155307fe6a
@ -607,104 +607,104 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/window/MainWindow.qml" line="86"/>
|
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||||
<location filename="qml/window/MainWindow.qml" line="94"/>
|
<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="87"/>
|
<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="88"/>
|
<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="91"/>
|
<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="91"/>
|
<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="95"/>
|
<location filename="qml/window/MainWindow.qml" line="96"/>
|
||||||
<location filename="qml/window/MainWindow.qml" line="339"/>
|
<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="106"/>
|
<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="203"/>
|
<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="213"/>
|
<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="304"/>
|
<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="305"/>
|
<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="306"/>
|
<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="310"/>
|
<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="310"/>
|
<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="312"/>
|
<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="312"/>
|
<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="336"/>
|
<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="337"/>
|
<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="337"/>
|
<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="337"/>
|
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||||
<source>
|
<source>
|
||||||
Now go and download the new version?
|
Now go and download the new version?
|
||||||
|
|
||||||
@ -713,17 +713,17 @@ Updated content:
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
<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="367"/>
|
<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="374"/>
|
<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>
|
||||||
|
@ -611,104 +611,104 @@
|
|||||||
<context>
|
<context>
|
||||||
<name>MainWindow</name>
|
<name>MainWindow</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/window/MainWindow.qml" line="310"/>
|
<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="86"/>
|
<location filename="qml/window/MainWindow.qml" line="87"/>
|
||||||
<location filename="qml/window/MainWindow.qml" line="94"/>
|
<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="87"/>
|
<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="88"/>
|
<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="91"/>
|
<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="91"/>
|
<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="95"/>
|
<location filename="qml/window/MainWindow.qml" line="96"/>
|
||||||
<location filename="qml/window/MainWindow.qml" line="339"/>
|
<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="106"/>
|
<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="203"/>
|
<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="213"/>
|
<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="304"/>
|
<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="305"/>
|
<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="306"/>
|
<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="310"/>
|
<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="312"/>
|
<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="312"/>
|
<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="336"/>
|
<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="337"/>
|
<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="337"/>
|
<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="337"/>
|
<location filename="qml/window/MainWindow.qml" line="338"/>
|
||||||
<source>
|
<source>
|
||||||
Now go and download the new version?
|
Now go and download the new version?
|
||||||
|
|
||||||
@ -721,17 +721,17 @@ Updated content:
|
|||||||
</translation>
|
</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="qml/window/MainWindow.qml" line="340"/>
|
<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="367"/>
|
<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="374"/>
|
<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>
|
||||||
|
@ -20,6 +20,7 @@ FluWindow {
|
|||||||
launchMode: FluWindowType.SingleTask
|
launchMode: FluWindowType.SingleTask
|
||||||
fitsAppBarWindows: true
|
fitsAppBarWindows: true
|
||||||
appBar: FluAppBar {
|
appBar: FluAppBar {
|
||||||
|
width: window.width
|
||||||
height: 30
|
height: 30
|
||||||
showDark: true
|
showDark: true
|
||||||
darkClickListener:(button)=>handleDarkChanged(button)
|
darkClickListener:(button)=>handleDarkChanged(button)
|
||||||
@ -234,7 +235,7 @@ FluWindow {
|
|||||||
id: com_reveal
|
id: com_reveal
|
||||||
CircularReveal{
|
CircularReveal{
|
||||||
id: reveal
|
id: reveal
|
||||||
target: window.containerItem()
|
target: window.contentItem
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
onAnimationFinished:{
|
onAnimationFinished:{
|
||||||
//动画结束后释放资源
|
//动画结束后释放资源
|
||||||
@ -263,7 +264,7 @@ FluWindow {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
loader_reveal.sourceComponent = com_reveal
|
loader_reveal.sourceComponent = com_reveal
|
||||||
var target = window.containerItem()
|
var target = window.contentItem
|
||||||
var pos = button.mapToItem(target,0,0)
|
var pos = button.mapToItem(target,0,0)
|
||||||
var mouseX = pos.x
|
var mouseX = pos.x
|
||||||
var mouseY = pos.y
|
var mouseY = pos.y
|
||||||
|
@ -108,14 +108,14 @@ void FluFrameless::componentComplete() {
|
|||||||
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
HWND hwnd = reinterpret_cast<HWND>(window()->winId());
|
||||||
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
DWORD style = ::GetWindowLongPtr(hwnd, GWL_STYLE);
|
||||||
if (_fixSize) {
|
if (_fixSize) {
|
||||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION);;
|
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME);;
|
||||||
for (int i = 0; i <= QGuiApplication::screens().count() - 1; ++i) {
|
for (int i = 0; i <= QGuiApplication::screens().count() - 1; ++i) {
|
||||||
connect(QGuiApplication::screens().at(i), &QScreen::logicalDotsPerInchChanged, this, [=] {
|
connect(QGuiApplication::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_FRAMECHANGED);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_CAPTION);
|
::SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME);
|
||||||
}
|
}
|
||||||
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
SetWindowPos(hwnd, nullptr, 0, 0, 0, 0, SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOMOVE | SWP_NOSIZE | SWP_FRAMECHANGED);
|
||||||
connect(window(), &QQuickWindow::screenChanged, this, [hwnd] {
|
connect(window(), &QQuickWindow::screenChanged, this, [hwnd] {
|
||||||
@ -168,11 +168,30 @@ void FluFrameless::componentComplete() {
|
|||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
} else if (uMsg == WM_NCCALCSIZE && wParam == TRUE) {
|
} 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);
|
bool isMaximum = ::IsZoomed(hwnd);
|
||||||
if (isMaximum) {
|
if (isMaximum) {
|
||||||
window()->setProperty("__margins",7);
|
auto geometry = window()->screen()->geometry();
|
||||||
}else{
|
auto offsetX = qAbs(geometry.left() - originalLeft);
|
||||||
window()->setProperty("__margins",0);
|
auto offsetY = qAbs(geometry.top() - originalTop);
|
||||||
|
clientRect->top = originalTop + offsetY;
|
||||||
|
clientRect->bottom = originalBottom - offsetY;
|
||||||
|
clientRect->left = originalLeft + offsetX;
|
||||||
|
clientRect->right = originalRight - offsetX;
|
||||||
|
} else {
|
||||||
|
clientRect->top = originalTop;
|
||||||
|
clientRect->bottom = originalBottom;
|
||||||
|
clientRect->left = originalLeft;
|
||||||
|
clientRect->right = originalRight;
|
||||||
}
|
}
|
||||||
_setMaximizeHovered(false);
|
_setMaximizeHovered(false);
|
||||||
*result = WVR_REDRAW;
|
*result = WVR_REDRAW;
|
||||||
@ -232,7 +251,7 @@ void FluFrameless::componentComplete() {
|
|||||||
return true;
|
return true;
|
||||||
} else if (uMsg == WM_NCPAINT) {
|
} else if (uMsg == WM_NCPAINT) {
|
||||||
*result = FALSE;
|
*result = FALSE;
|
||||||
return false;
|
return true;
|
||||||
} else if (uMsg == WM_NCACTIVATE) {
|
} else if (uMsg == WM_NCACTIVATE) {
|
||||||
*result = TRUE;
|
*result = TRUE;
|
||||||
return true;
|
return true;
|
||||||
|
@ -16,6 +16,7 @@ Window {
|
|||||||
property Item appBar: FluAppBar {
|
property Item appBar: FluAppBar {
|
||||||
title: window.title
|
title: window.title
|
||||||
height: 30
|
height: 30
|
||||||
|
width: window.width
|
||||||
showDark: window.showDark
|
showDark: window.showDark
|
||||||
showClose: window.showClose
|
showClose: window.showClose
|
||||||
showMinimize: window.showMinimize
|
showMinimize: window.showMinimize
|
||||||
@ -40,7 +41,6 @@ Window {
|
|||||||
property bool autoCenter: true
|
property bool autoCenter: true
|
||||||
property bool autoDestroy: true
|
property bool autoDestroy: true
|
||||||
property bool useSystemAppBar
|
property bool useSystemAppBar
|
||||||
property int __margins: 0
|
|
||||||
property color resizeBorderColor: {
|
property color resizeBorderColor: {
|
||||||
if(window.active){
|
if(window.active){
|
||||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||||
@ -174,11 +174,6 @@ Window {
|
|||||||
id:com_app_bar
|
id:com_app_bar
|
||||||
Item{
|
Item{
|
||||||
data: window.appBar
|
data: window.appBar
|
||||||
Component.onCompleted: {
|
|
||||||
window.appBar.width = Qt.binding(function(){
|
|
||||||
return this.parent.width
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component{
|
Component{
|
||||||
@ -251,58 +246,53 @@ Window {
|
|||||||
border.color: window.resizeBorderColor
|
border.color: window.resizeBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item{
|
FluLoader{
|
||||||
id: layout_container
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: window.__margins
|
sourceComponent: background
|
||||||
FluLoader{
|
}
|
||||||
anchors.fill: parent
|
FluLoader{
|
||||||
sourceComponent: background
|
id:loader_app_bar
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
}
|
}
|
||||||
FluLoader{
|
height: {
|
||||||
id:loader_app_bar
|
if(window.useSystemAppBar){
|
||||||
anchors {
|
return 0
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
}
|
||||||
height: {
|
return window.fitsAppBarWindows ? 0 : window.appBar.height
|
||||||
if(window.useSystemAppBar){
|
}
|
||||||
return 0
|
sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
|
||||||
}
|
}
|
||||||
return window.fitsAppBarWindows ? 0 : window.appBar.height
|
Item{
|
||||||
}
|
id:layout_content
|
||||||
sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
|
anchors{
|
||||||
}
|
top: loader_app_bar.bottom
|
||||||
Item{
|
left: parent.left
|
||||||
id: layout_content
|
right: parent.right
|
||||||
anchors{
|
bottom: parent.bottom
|
||||||
top: loader_app_bar.bottom
|
}
|
||||||
left: parent.left
|
clip: true
|
||||||
right: parent.right
|
}
|
||||||
bottom: parent.bottom
|
FluLoader{
|
||||||
}
|
property string loadingText
|
||||||
clip: true
|
property bool cancel: false
|
||||||
}
|
id:loader_loading
|
||||||
FluLoader{
|
anchors.fill: parent
|
||||||
property string loadingText
|
}
|
||||||
property bool cancel: false
|
FluInfoBar{
|
||||||
id:loader_loading
|
id:info_bar
|
||||||
anchors.fill: parent
|
root: window
|
||||||
}
|
}
|
||||||
FluInfoBar{
|
FluLoader{
|
||||||
id:info_bar
|
id:loader_border
|
||||||
root: layout_container
|
anchors.fill: parent
|
||||||
}
|
sourceComponent: {
|
||||||
FluLoader{
|
if(window.useSystemAppBar || FluTools.isWin() || window.visibility === Window.Maximized || window.visibility === Window.FullScreen){
|
||||||
id:loader_border
|
return undefined
|
||||||
anchors.fill: parent
|
|
||||||
sourceComponent: {
|
|
||||||
if(window.useSystemAppBar || FluTools.isWin() || window.visibility === Window.Maximized || window.visibility === Window.FullScreen){
|
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
return com_border
|
|
||||||
}
|
}
|
||||||
|
return com_border
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function hideLoading(){
|
function hideLoading(){
|
||||||
@ -335,6 +325,9 @@ Window {
|
|||||||
window.minimumHeight = window.height
|
window.minimumHeight = window.height
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
function registerForWindowResult(path){
|
||||||
|
return FluApp.createWindowRegister(window,path)
|
||||||
|
}
|
||||||
function setResult(data){
|
function setResult(data){
|
||||||
if(_windowRegister){
|
if(_windowRegister){
|
||||||
_windowRegister.setResult(data)
|
_windowRegister.setResult(data)
|
||||||
@ -363,7 +356,4 @@ Window {
|
|||||||
function deleteLater(){
|
function deleteLater(){
|
||||||
FluTools.deleteLater(window)
|
FluTools.deleteLater(window)
|
||||||
}
|
}
|
||||||
function containerItem(){
|
|
||||||
return layout_container
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ Window {
|
|||||||
property Item appBar: FluAppBar {
|
property Item appBar: FluAppBar {
|
||||||
title: window.title
|
title: window.title
|
||||||
height: 30
|
height: 30
|
||||||
|
width: window.width
|
||||||
showDark: window.showDark
|
showDark: window.showDark
|
||||||
showClose: window.showClose
|
showClose: window.showClose
|
||||||
showMinimize: window.showMinimize
|
showMinimize: window.showMinimize
|
||||||
@ -39,7 +40,6 @@ Window {
|
|||||||
property bool autoCenter: true
|
property bool autoCenter: true
|
||||||
property bool autoDestroy: true
|
property bool autoDestroy: true
|
||||||
property bool useSystemAppBar
|
property bool useSystemAppBar
|
||||||
property int __margins: 0
|
|
||||||
property color resizeBorderColor: {
|
property color resizeBorderColor: {
|
||||||
if(window.active){
|
if(window.active){
|
||||||
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
return FluTheme.dark ? Qt.rgba(51/255,51/255,51/255,1) : Qt.rgba(110/255,110/255,110/255,1)
|
||||||
@ -173,11 +173,6 @@ Window {
|
|||||||
id:com_app_bar
|
id:com_app_bar
|
||||||
Item{
|
Item{
|
||||||
data: window.appBar
|
data: window.appBar
|
||||||
Component.onCompleted: {
|
|
||||||
window.appBar.width = Qt.binding(function(){
|
|
||||||
return this.parent.width
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Component{
|
Component{
|
||||||
@ -250,59 +245,53 @@ Window {
|
|||||||
border.color: window.resizeBorderColor
|
border.color: window.resizeBorderColor
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Item{
|
FluLoader{
|
||||||
id: layout_container
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: window.__margins
|
sourceComponent: background
|
||||||
FluLoader{
|
}
|
||||||
anchors.fill: parent
|
FluLoader{
|
||||||
sourceComponent: background
|
id:loader_app_bar
|
||||||
|
anchors {
|
||||||
|
top: parent.top
|
||||||
|
left: parent.left
|
||||||
|
right: parent.right
|
||||||
}
|
}
|
||||||
FluLoader{
|
height: {
|
||||||
id:loader_app_bar
|
if(window.useSystemAppBar){
|
||||||
anchors {
|
return 0
|
||||||
top: parent.top
|
|
||||||
left: parent.left
|
|
||||||
right: parent.right
|
|
||||||
}
|
}
|
||||||
height: {
|
return window.fitsAppBarWindows ? 0 : window.appBar.height
|
||||||
if(window.useSystemAppBar){
|
}
|
||||||
return 0
|
sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
|
||||||
}
|
}
|
||||||
return window.fitsAppBarWindows ? 0 : window.appBar.height
|
Item{
|
||||||
}
|
id:layout_content
|
||||||
sourceComponent: window.useSystemAppBar ? undefined : com_app_bar
|
anchors{
|
||||||
}
|
top: loader_app_bar.bottom
|
||||||
Item{
|
left: parent.left
|
||||||
id:layout_content
|
right: parent.right
|
||||||
anchors{
|
bottom: parent.bottom
|
||||||
top: loader_app_bar.bottom
|
}
|
||||||
left: parent.left
|
clip: true
|
||||||
right: parent.right
|
}
|
||||||
bottom: parent.bottom
|
FluLoader{
|
||||||
}
|
property string loadingText
|
||||||
clip: true
|
property bool cancel: false
|
||||||
}
|
id:loader_loading
|
||||||
FluLoader{
|
anchors.fill: parent
|
||||||
property string loadingText
|
}
|
||||||
property bool cancel: false
|
FluInfoBar{
|
||||||
id:loader_loading
|
id:info_bar
|
||||||
anchors.fill: parent
|
root: window
|
||||||
}
|
}
|
||||||
FluInfoBar{
|
FluLoader{
|
||||||
id:info_bar
|
id:loader_border
|
||||||
root: layout_container
|
anchors.fill: parent
|
||||||
}
|
sourceComponent: {
|
||||||
|
if(window.useSystemAppBar || FluTools.isWin() || window.visibility === Window.Maximized || window.visibility === Window.FullScreen){
|
||||||
FluLoader{
|
return undefined
|
||||||
id:loader_border
|
|
||||||
anchors.fill: parent
|
|
||||||
sourceComponent: {
|
|
||||||
if(window.useSystemAppBar || FluTools.isWin() || window.visibility === Window.Maximized || window.visibility === Window.FullScreen){
|
|
||||||
return undefined
|
|
||||||
}
|
|
||||||
return com_border
|
|
||||||
}
|
}
|
||||||
|
return com_border
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function hideLoading(){
|
function hideLoading(){
|
||||||
@ -363,7 +352,4 @@ Window {
|
|||||||
function deleteLater(){
|
function deleteLater(){
|
||||||
FluTools.deleteLater(window)
|
FluTools.deleteLater(window)
|
||||||
}
|
}
|
||||||
function containerItem(){
|
|
||||||
return layout_container
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user