mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 09:23:06 +00:00
[MSPAINT] Fix the type of cursor displayed when overlaying scrollbars (#5332)
When the window size is smaller than the image size in both directions, the wrong cursor is displayed when hovering the mouse over the scrollbars. Readjust position for file date and file size objects, to fit all text. CORE-18867
This commit is contained in:
parent
3da25b73c2
commit
9ff9580fb0
2 changed files with 13 additions and 3 deletions
|
@ -621,6 +621,15 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
::GetCursorPos(&pt);
|
||||
ScreenToClient(&pt);
|
||||
|
||||
CRect rcClient;
|
||||
GetClientRect(&rcClient);
|
||||
|
||||
if (!::PtInRect(&rcClient, pt))
|
||||
{
|
||||
bHandled = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
CANVAS_HITTEST hitSelection = SelectionHitTest(pt);
|
||||
if (hitSelection != HIT_NONE)
|
||||
{
|
||||
|
@ -632,6 +641,7 @@ LRESULT CCanvasWindow::OnSetCursor(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL
|
|||
CRect rcImage;
|
||||
GetImageRect(rcImage);
|
||||
ImageToCanvas(rcImage);
|
||||
|
||||
if (::PtInRect(&rcImage, pt))
|
||||
{
|
||||
switch (toolsModel.GetActiveTool())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue