https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ff9580fb0c873bddca8c…
commit 9ff9580fb0c873bddca8c29551aad879090dc2d4
Author: Jose Carlos Jesus <zecarlos1957(a)hotmail.com>
AuthorDate: Tue Jun 13 00:01:39 2023 -0400
Commit: GitHub <noreply(a)github.com>
CommitDate: Tue Jun 13 13:01:39 2023 +0900
[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
---
base/applications/mspaint/canvas.cpp | 10 ++++++++++
base/applications/mspaint/lang/pt-PT.rc | 6 +++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/base/applications/mspaint/canvas.cpp b/base/applications/mspaint/canvas.cpp
index 38951215c42..c9f2ec887ba 100644
--- a/base/applications/mspaint/canvas.cpp
+++ b/base/applications/mspaint/canvas.cpp
@@ -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())
diff --git a/base/applications/mspaint/lang/pt-PT.rc
b/base/applications/mspaint/lang/pt-PT.rc
index f67a2339464..ef8a793a3c1 100644
--- a/base/applications/mspaint/lang/pt-PT.rc
+++ b/base/applications/mspaint/lang/pt-PT.rc
@@ -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