mirror of
https://github.com/reactos/reactos.git
synced 2024-07-01 02:10:07 +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
|
@ -50,8 +50,8 @@ void RegistrySettings::SetWallpaper(LPCTSTR szFileName, RegistrySettings::Wallpa
|
||||||
|
|
||||||
void RegistrySettings::LoadPresets()
|
void RegistrySettings::LoadPresets()
|
||||||
{
|
{
|
||||||
BMPHeight = 300;
|
BMPHeight = GetSystemMetrics(SM_CYSCREEN) / 2;
|
||||||
BMPWidth = 400;
|
BMPWidth = GetSystemMetrics(SM_CXSCREEN) / 2;
|
||||||
GridExtent = 1;
|
GridExtent = 1;
|
||||||
NoStretching = 0;
|
NoStretching = 0;
|
||||||
ShowThumbnail = 0;
|
ShowThumbnail = 0;
|
||||||
|
@ -103,6 +103,12 @@ void RegistrySettings::Load()
|
||||||
ReadFileHistory(files, _T("File3"), strFile3);
|
ReadFileHistory(files, _T("File3"), strFile3);
|
||||||
ReadFileHistory(files, _T("File4"), strFile4);
|
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()
|
void RegistrySettings::Store()
|
||||||
|
|
Loading…
Reference in a new issue