mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 11:17:15 +08:00
update
This commit is contained in:
parent
e0c28e2693
commit
bb19554215
@ -116,9 +116,7 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
}else if(uMsg == WM_NCCALCSIZE){
|
}else if(uMsg == WM_NCCALCSIZE){
|
||||||
const auto clientRect = ((wParam == FALSE) ? reinterpret_cast<LPRECT>(lParam) : &(reinterpret_cast<LPNCCALCSIZE_PARAMS>(lParam))->rgrc[0]);
|
const auto clientRect = ((wParam == FALSE) ? reinterpret_cast<LPRECT>(lParam) : &(reinterpret_cast<LPNCCALCSIZE_PARAMS>(lParam))->rgrc[0]);
|
||||||
const LONG originalTop = clientRect->top;
|
const LONG originalTop = clientRect->top;
|
||||||
const LONG originalBottom = clientRect->bottom;
|
|
||||||
const LONG originalLeft = clientRect->left;
|
const LONG originalLeft = clientRect->left;
|
||||||
const LONG originalRight = clientRect->right;
|
|
||||||
const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam);
|
const LRESULT hitTestResult = ::DefWindowProcW(hwnd, WM_NCCALCSIZE, wParam, lParam);
|
||||||
if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
|
if ((hitTestResult != HTERROR) && (hitTestResult != HTNOWHERE)) {
|
||||||
*result = hitTestResult;
|
*result = hitTestResult;
|
||||||
@ -141,7 +139,6 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
clientRect->top = originalTop+offsetTop;
|
clientRect->top = originalTop+offsetTop;
|
||||||
clientRect->bottom = originalBottom-offsetTop;
|
|
||||||
*result = WVR_REDRAW;
|
*result = WVR_REDRAW;
|
||||||
return true;
|
return true;
|
||||||
}if(uMsg == WM_NCHITTEST){
|
}if(uMsg == WM_NCHITTEST){
|
||||||
@ -300,9 +297,9 @@ void FluFramelessHelper::componentComplete(){
|
|||||||
HWND hwnd = reinterpret_cast<HWND>(window->winId());
|
HWND hwnd = reinterpret_cast<HWND>(window->winId());
|
||||||
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
|
DWORD style = ::GetWindowLong(hwnd, GWL_STYLE);
|
||||||
if(resizeable()){
|
if(resizeable()){
|
||||||
SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME | WS_BORDER);
|
SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_MAXIMIZEBOX | WS_THICKFRAME);
|
||||||
}else{
|
}else{
|
||||||
SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_BORDER);
|
SetWindowLongPtr(hwnd, GWL_STYLE, style | 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);
|
||||||
showShadow(hwnd);
|
showShadow(hwnd);
|
||||||
|
@ -209,7 +209,6 @@ Window {
|
|||||||
anchors{
|
anchors{
|
||||||
fill:parent
|
fill:parent
|
||||||
topMargin: _offsetXY.y
|
topMargin: _offsetXY.y
|
||||||
bottomMargin: _offsetXY.y
|
|
||||||
}
|
}
|
||||||
onWidthChanged: {
|
onWidthChanged: {
|
||||||
window.appBar.width = width
|
window.appBar.width = width
|
||||||
|
@ -208,7 +208,6 @@ Window {
|
|||||||
anchors{
|
anchors{
|
||||||
fill:parent
|
fill:parent
|
||||||
topMargin: _offsetXY.y
|
topMargin: _offsetXY.y
|
||||||
bottomMargin: _offsetXY.y
|
|
||||||
}
|
}
|
||||||
onWidthChanged: {
|
onWidthChanged: {
|
||||||
window.appBar.width = width
|
window.appBar.width = width
|
||||||
|
Loading…
Reference in New Issue
Block a user