Commit aab700d1 authored by Frank Richter's avatar Frank Richter Committed by Alexandre Julliard

Set some default values for truesize sizing that seem closer to

Windows.
parent 6625b63b
...@@ -462,7 +462,7 @@ static HRESULT get_image_part_size (HTHEME hTheme, HDC hdc, int iPartId, ...@@ -462,7 +462,7 @@ static HRESULT get_image_part_size (HTHEME hTheme, HDC hdc, int iPartId,
GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_SIZINGTYPE, &sizingtype); GetThemeEnumValue(hTheme, iPartId, iStateId, TMT_SIZINGTYPE, &sizingtype);
if(sizingtype == ST_TRUESIZE) { if(sizingtype == ST_TRUESIZE) {
int truesizestretchmark = 0; int truesizestretchmark = 100;
if(dstSize.x < 0 || dstSize.y < 0) { if(dstSize.x < 0 || dstSize.y < 0) {
BOOL mirrorimage = TRUE; BOOL mirrorimage = TRUE;
...@@ -481,8 +481,8 @@ static HRESULT get_image_part_size (HTHEME hTheme, HDC hdc, int iPartId, ...@@ -481,8 +481,8 @@ static HRESULT get_image_part_size (HTHEME hTheme, HDC hdc, int iPartId,
/* Only stretch when target exceeds source by truesizestretchmark percent */ /* Only stretch when target exceeds source by truesizestretchmark percent */
GetThemeInt(hTheme, iPartId, iStateId, TMT_TRUESIZESTRETCHMARK, &truesizestretchmark); GetThemeInt(hTheme, iPartId, iStateId, TMT_TRUESIZESTRETCHMARK, &truesizestretchmark);
if(dstSize.x < 0 || dstSize.y < 0 || if(dstSize.x < 0 || dstSize.y < 0 ||
MulDiv(srcSize.x, 100, dstSize.x) > truesizestretchmark || (MulDiv(srcSize.x, 100, dstSize.x) > truesizestretchmark &&
MulDiv(srcSize.y, 100, dstSize.y) > truesizestretchmark) { MulDiv(srcSize.y, 100, dstSize.y) > truesizestretchmark)) {
memcpy (psz, &dstSize, sizeof (SIZE)); memcpy (psz, &dstSize, sizeof (SIZE));
} }
else { else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment