mirror of
https://github.com/reactos/reactos.git
synced 2025-05-02 04:05:56 +00:00
[MSPAINT] Fix the size of settings if too large (#4189)
- Fix the initial values of BMPHeight and BMPWidth. - Fix the values of BMPHeight and BMPWidth if too large.
This commit is contained in:
parent
98775c4c83
commit
30e47fdb77
1 changed files with 8 additions and 2 deletions
|
@ -50,8 +50,8 @@ void RegistrySettings::SetWallpaper(LPCTSTR szFileName, RegistrySettings::Wallpa
|
|||
|
||||
void RegistrySettings::LoadPresets()
|
||||
{
|
||||
BMPHeight = 300;
|
||||
BMPWidth = 400;
|
||||
BMPHeight = GetSystemMetrics(SM_CYSCREEN) / 2;
|
||||
BMPWidth = GetSystemMetrics(SM_CXSCREEN) / 2;
|
||||
GridExtent = 1;
|
||||
NoStretching = 0;
|
||||
ShowThumbnail = 0;
|
||||
|
@ -103,6 +103,12 @@ void RegistrySettings::Load()
|
|||
ReadFileHistory(files, _T("File3"), strFile3);
|
||||
ReadFileHistory(files, _T("File4"), strFile4);
|
||||
}
|
||||
|
||||
// Fix the bitmap size if too large
|
||||
if (BMPWidth > 5000)
|
||||
BMPWidth = (GetSystemMetrics(SM_CXSCREEN) * 6) / 10;
|
||||
if (BMPHeight > 5000)
|
||||
BMPHeight = (GetSystemMetrics(SM_CYSCREEN) * 6) / 10;
|
||||
}
|
||||
|
||||
void RegistrySettings::Store()
|
||||
|
|
Loading…
Reference in a new issue