https://git.reactos.org/?p=reactos.git;a=commitdiff;h=cf64f121f251b32dc6563…
commit cf64f121f251b32dc65638117b0f4c2ae1f4891b
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Tue Dec 24 04:30:25 2019 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Tue Dec 24 04:30:25 2019 +0900
[MSPAINT] Refactor updateCanvasAndScrollbars
---
base/applications/mspaint/imgarea.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/base/applications/mspaint/imgarea.cpp
b/base/applications/mspaint/imgarea.cpp
index 74bf84414f3..b31f7642c74 100644
--- a/base/applications/mspaint/imgarea.cpp
+++ b/base/applications/mspaint/imgarea.cpp
@@ -20,7 +20,11 @@ void
updateCanvasAndScrollbars()
{
selectionWindow.ShowWindow(SW_HIDE);
- imageArea.MoveWindow(3, 3, imageModel.GetWidth() * toolsModel.GetZoom() / 1000,
imageModel.GetHeight() * toolsModel.GetZoom() / 1000, FALSE);
+
+ int zoomedWidth = imageModel.GetWidth() * toolsModel.GetZoom() / 1000;
+ int zoomedHeight = imageModel.GetHeight() * toolsModel.GetZoom() / 1000;
+ imageArea.MoveWindow(3, 3, zoomedWidth, zoomedHeight, FALSE);
+
scrollboxWindow.Invalidate(TRUE);
imageArea.Invalidate(FALSE);