[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:
Jose Carlos Jesus 2023-06-13 00:01:39 -04:00 committed by GitHub
parent 3da25b73c2
commit 9ff9580fb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 3 deletions

View file

@ -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())

View file

@ -151,9 +151,9 @@ BEGIN
LTEXT "Data do ficheiro:", IDD_ATTRIBUTESTEXT3, 10, 5, 60, 10
LTEXT "Tamanho no disco:", IDD_ATTRIBUTESTEXT4, 10, 15, 60, 10
LTEXT "Resolução:", IDD_ATTRIBUTESTEXT5, 10, 25, 60, 10
LTEXT "não disponível", IDD_ATTRIBUTESTEXT6, 60, 5, 90, 10
LTEXT "não disponível", IDD_ATTRIBUTESTEXT7, 60, 15, 90, 10
LTEXT "ppcm", IDD_ATTRIBUTESTEXT8, 60, 25, 90, 10 /* This unit must match IDS_PRINTRES */
LTEXT "não disponível", IDD_ATTRIBUTESTEXT6, 80, 5, 90, 10
LTEXT "não disponível", IDD_ATTRIBUTESTEXT7, 80, 15, 90, 10
LTEXT "ppcm", IDD_ATTRIBUTESTEXT8, 80, 25, 90, 10 /* This unit must match IDS_PRINTRES */
GROUPBOX "Unidades", IDD_ATTRIBUTESGROUP1, 6, 57, 158, 27
AUTORADIOBUTTON "P&olegadas", IDD_ATTRIBUTESRB1, 12, 69, 45, 10, WS_GROUP
AUTORADIOBUTTON "c&m", IDD_ATTRIBUTESRB2, 62, 69, 45, 10