[MSPAINT] Improve CMiniatureWindow (#5337)

- Save the position and size of the miniature window.
- Improve drawing of the miniature window.
- Sync with the canvas.
CORE-18867
This commit is contained in:
Katayama Hirofumi MZ 2023-06-14 18:51:40 +09:00 committed by GitHub
parent 113656563a
commit bfd42c67a1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 86 additions and 34 deletions

View file

@ -17,6 +17,8 @@ void ImageModel::NotifyImageChanged()
{
if (canvasWindow.IsWindow())
canvasWindow.Invalidate(FALSE);
if (miniature.IsWindow())
miniature.Invalidate(FALSE);
}
ImageModel::ImageModel()
@ -264,7 +266,7 @@ void ImageModel::DeleteSelection()
NotifyImageChanged();
}
void ImageModel::Bound(POINT& pt)
void ImageModel::Bound(POINT& pt) const
{
pt.x = max(0, min(pt.x, GetWidth()));
pt.y = max(0, min(pt.y, GetHeight()));