mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-08-18 01:44:28 +08:00
Update release
This commit is contained in:
+29
-19
@@ -33509,6 +33509,31 @@ Native Window Provider
|
||||
{
|
||||
currentController=controller;
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
Helper Functions
|
||||
***********************************************************************/
|
||||
|
||||
INativeCursor* GetCursorFromHitTest(INativeWindowListener::HitTestResult hitTestResult, INativeResourceService* resourceService)
|
||||
{
|
||||
switch (hitTestResult)
|
||||
{
|
||||
case INativeWindowListener::BorderLeft:
|
||||
case INativeWindowListener::BorderRight:
|
||||
return resourceService->GetSystemCursor(INativeCursor::SizeWE);
|
||||
case INativeWindowListener::BorderTop:
|
||||
case INativeWindowListener::BorderBottom:
|
||||
return resourceService->GetSystemCursor(INativeCursor::SizeNS);
|
||||
case INativeWindowListener::BorderLeftTop:
|
||||
case INativeWindowListener::BorderRightBottom:
|
||||
return resourceService->GetSystemCursor(INativeCursor::SizeNWSE);
|
||||
case INativeWindowListener::BorderRightTop:
|
||||
case INativeWindowListener::BorderLeftBottom:
|
||||
return resourceService->GetSystemCursor(INativeCursor::SizeNESW);
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34138,27 +34163,12 @@ GuiHostedController::INativeWindowListener (PreAction)
|
||||
auto x = info.x.value - hoveringWindow->wmWindow.bounds.x1.value;
|
||||
auto y = info.y.value - hoveringWindow->wmWindow.bounds.y1.value;
|
||||
auto hitTestResult = PerformHitTest(From(hoveringWindow->listeners), { {x},{y} });
|
||||
switch (hitTestResult)
|
||||
auto cursor = GetCursorFromHitTest(hitTestResult, ResourceService());
|
||||
if (cursor == nullptr)
|
||||
{
|
||||
case INativeWindowListener::BorderLeft:
|
||||
case INativeWindowListener::BorderRight:
|
||||
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeWE));
|
||||
break;
|
||||
case INativeWindowListener::BorderTop:
|
||||
case INativeWindowListener::BorderBottom:
|
||||
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNS));
|
||||
break;
|
||||
case INativeWindowListener::BorderLeftTop:
|
||||
case INativeWindowListener::BorderRightBottom:
|
||||
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNWSE));
|
||||
break;
|
||||
case INativeWindowListener::BorderRightTop:
|
||||
case INativeWindowListener::BorderLeftBottom:
|
||||
nativeWindow->SetWindowCursor(ResourceService()->GetSystemCursor(INativeCursor::SizeNESW));
|
||||
break;
|
||||
default:
|
||||
nativeWindow->SetWindowCursor(hoveringWindow->GetWindowCursor());
|
||||
cursor = hoveringWindow->GetWindowCursor();
|
||||
}
|
||||
nativeWindow->SetWindowCursor(cursor);
|
||||
}
|
||||
|
||||
if (wmWindow)
|
||||
|
||||
Reference in New Issue
Block a user