mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2025-02-03 03:37:46 +08:00
update
This commit is contained in:
parent
fa6b5cfc45
commit
9dd9d10049
@ -33,7 +33,7 @@ static inline bool isCompositionEnabled(){
|
|||||||
|
|
||||||
static inline void showShadow(HWND hwnd){
|
static inline void showShadow(HWND hwnd){
|
||||||
if(isCompositionEnabled()){
|
if(isCompositionEnabled()){
|
||||||
const MARGINS shadow = { 1, 1, 1, 1 };
|
const MARGINS shadow = { 1, 0, 0, 0 };
|
||||||
typedef HRESULT (WINAPI* DwmExtendFrameIntoClientAreaPtr)(HWND hWnd, const MARGINS *pMarInset);
|
typedef HRESULT (WINAPI* DwmExtendFrameIntoClientAreaPtr)(HWND hWnd, const MARGINS *pMarInset);
|
||||||
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
HMODULE module = LoadLibraryW(L"dwmapi.dll");
|
||||||
if (module)
|
if (module)
|
||||||
@ -105,7 +105,9 @@ bool FramelessEventFilter::nativeEventFilter(const QByteArray &eventType, void *
|
|||||||
return false;
|
return false;
|
||||||
}else if(uMsg == WM_NCHITTEST){
|
}else if(uMsg == WM_NCHITTEST){
|
||||||
if(_helper->hoverMaxBtn() && _helper->resizeable()){
|
if(_helper->hoverMaxBtn() && _helper->resizeable()){
|
||||||
*result = HTMAXBUTTON;
|
if (*result == HTNOWHERE) {
|
||||||
|
*result = HTZOOM;
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
@ -288,7 +290,7 @@ void FluFramelessHelper::_onStayTopChange(){
|
|||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
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);
|
||||||
SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION | WS_MAXIMIZEBOX &~ WS_SYSMENU);
|
SetWindowLongPtr(hwnd, GWL_STYLE, style | WS_THICKFRAME | WS_CAPTION &~ WS_SYSMENU);
|
||||||
if(isStayTop){
|
if(isStayTop){
|
||||||
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
|
||||||
}else{
|
}else{
|
||||||
|
@ -233,8 +233,11 @@ Rectangle{
|
|||||||
if(pressed){
|
if(pressed){
|
||||||
return maximizePressColor
|
return maximizePressColor
|
||||||
}
|
}
|
||||||
|
if(FluTools.isWin() && !FluApp.useSystemAppBar){
|
||||||
return d.hoverMaxBtn ? maximizeHoverColor : maximizeNormalColor
|
return d.hoverMaxBtn ? maximizeHoverColor : maximizeNormalColor
|
||||||
}
|
}
|
||||||
|
return hovered ? maximizeHoverColor : maximizeNormalColor
|
||||||
|
}
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: d.resizable && !isMac && showMaximize
|
visible: d.resizable && !isMac && showMaximize
|
||||||
radius: 0
|
radius: 0
|
||||||
|
@ -233,8 +233,11 @@ Rectangle{
|
|||||||
if(pressed){
|
if(pressed){
|
||||||
return maximizePressColor
|
return maximizePressColor
|
||||||
}
|
}
|
||||||
|
if(FluTools.isWin() && !FluApp.useSystemAppBar){
|
||||||
return d.hoverMaxBtn ? maximizeHoverColor : maximizeNormalColor
|
return d.hoverMaxBtn ? maximizeHoverColor : maximizeNormalColor
|
||||||
}
|
}
|
||||||
|
return hovered ? maximizeHoverColor : maximizeNormalColor
|
||||||
|
}
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
visible: d.resizable && !isMac && showMaximize
|
visible: d.resizable && !isMac && showMaximize
|
||||||
radius: 0
|
radius: 0
|
||||||
|
Loading…
Reference in New Issue
Block a user