mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-02 19:27:38 +08:00
update
This commit is contained in:
parent
d817782526
commit
2cfc73c00b
@ -73,22 +73,11 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const UINT uMsg = msg->message;
|
const UINT uMsg = msg->message;
|
||||||
const WPARAM wParam = msg->wParam;
|
|
||||||
const LPARAM lParam = msg->lParam;
|
|
||||||
if (!msg || !hwnd)
|
if (!msg || !hwnd)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if(uMsg == WM_WINDOWPOSCHANGING){
|
if(uMsg == WM_NCCALCSIZE){
|
||||||
WINDOWPOS* wp = reinterpret_cast<WINDOWPOS*>(lParam);
|
|
||||||
if (wp != nullptr && (wp->flags & SWP_NOSIZE) == 0)
|
|
||||||
{
|
|
||||||
wp->flags |= SWP_NOCOPYBITS;
|
|
||||||
*result = DefWindowProc(hwnd, uMsg, wParam, lParam);
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}else if(uMsg == WM_NCCALCSIZE){
|
|
||||||
*result = WVR_REDRAW;
|
*result = WVR_REDRAW;
|
||||||
return true;
|
return true;
|
||||||
}else if(uMsg == WM_NCPAINT){
|
}else if(uMsg == WM_NCPAINT){
|
||||||
|
@ -179,7 +179,7 @@ Window {
|
|||||||
if(window.visibility === Window.Maximized){
|
if(window.visibility === Window.Maximized){
|
||||||
var dx = window.x-Screen.virtualX
|
var dx = window.x-Screen.virtualX
|
||||||
if(dx<0){
|
if(dx<0){
|
||||||
return Math.abs(dx)
|
return Math.abs(dx+1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
@ -188,7 +188,7 @@ Window {
|
|||||||
if(window.visibility === Window.Maximized){
|
if(window.visibility === Window.Maximized){
|
||||||
var dy = window.y-Screen.virtualY
|
var dy = window.y-Screen.virtualY
|
||||||
if(dy<0){
|
if(dy<0){
|
||||||
return Math.abs(dy)
|
return Math.abs(dy+1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
@ -290,10 +290,12 @@ Window {
|
|||||||
function moveWindowToDesktopCenter(){
|
function moveWindowToDesktopCenter(){
|
||||||
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
|
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
|
||||||
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height)/2+Screen.virtualY,window.width,window.height)
|
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height)/2+Screen.virtualY,window.width,window.height)
|
||||||
maximumWidth = fixSize ? width : 16777215
|
if(fixSize){
|
||||||
maximumHeight = fixSize ? height : 16777215
|
maximumWidth = width
|
||||||
minimumWidth = fixSize ? width : 0
|
maximumHeight = height
|
||||||
minimumHeight = fixSize ? height : 0
|
minimumWidth = width
|
||||||
|
minimumHeight = height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function onResult(data){
|
function onResult(data){
|
||||||
if(_pageRegister){
|
if(_pageRegister){
|
||||||
|
@ -178,7 +178,7 @@ Window {
|
|||||||
if(window.visibility === Window.Maximized){
|
if(window.visibility === Window.Maximized){
|
||||||
var dx = window.x-Screen.virtualX
|
var dx = window.x-Screen.virtualX
|
||||||
if(dx<0){
|
if(dx<0){
|
||||||
return Math.abs(dx)
|
return Math.abs(dx+1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
@ -187,7 +187,7 @@ Window {
|
|||||||
if(window.visibility === Window.Maximized){
|
if(window.visibility === Window.Maximized){
|
||||||
var dy = window.y-Screen.virtualY
|
var dy = window.y-Screen.virtualY
|
||||||
if(dy<0){
|
if(dy<0){
|
||||||
return Math.abs(dy)
|
return Math.abs(dy+1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
@ -289,10 +289,12 @@ Window {
|
|||||||
function moveWindowToDesktopCenter(){
|
function moveWindowToDesktopCenter(){
|
||||||
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
|
screen = Qt.application.screens[FluTools.cursorScreenIndex()]
|
||||||
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height)/2+Screen.virtualY,window.width,window.height)
|
window.setGeometry((Screen.width-window.width)/2+Screen.virtualX,(Screen.height-window.height)/2+Screen.virtualY,window.width,window.height)
|
||||||
maximumWidth = fixSize ? width : 16777215
|
if(fixSize){
|
||||||
maximumHeight = fixSize ? height : 16777215
|
maximumWidth = width
|
||||||
minimumWidth = fixSize ? width : 0
|
maximumHeight = height
|
||||||
minimumHeight = fixSize ? height : 0
|
minimumWidth = width
|
||||||
|
minimumHeight = height
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function onResult(data){
|
function onResult(data){
|
||||||
if(_pageRegister){
|
if(_pageRegister){
|
||||||
|
Loading…
Reference in New Issue
Block a user