uxtheme: Remove a redundant condition check.
The sizingtype check is redundant because it can only be ST_TRUESIZE, ST_STRETCH or ST_TILE and the check is already in the not ST_TRUESIZE branch. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d987c277c1
commit
f9923d6bb9
|
@ -710,6 +710,7 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
int iStateId, RECT *pRect,
|
||||
const DTBGOPTS *pOptions)
|
||||
{
|
||||
int destCenterWidth, srcCenterWidth, destCenterHeight, srcCenterHeight;
|
||||
HRESULT hr = S_OK;
|
||||
HBITMAP bmpSrc;
|
||||
HGDIOBJ oldSrc;
|
||||
|
@ -825,11 +826,10 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
goto draw_error;
|
||||
}
|
||||
|
||||
if ((sizingtype == ST_STRETCH) || (sizingtype == ST_TILE)) {
|
||||
int destCenterWidth = dstSize.x - (sm.cxLeftWidth + sm.cxRightWidth);
|
||||
int srcCenterWidth = srcSize.x - (sm.cxLeftWidth + sm.cxRightWidth);
|
||||
int destCenterHeight = dstSize.y - (sm.cyTopHeight + sm.cyBottomHeight);
|
||||
int srcCenterHeight = srcSize.y - (sm.cyTopHeight + sm.cyBottomHeight);
|
||||
destCenterWidth = dstSize.x - (sm.cxLeftWidth + sm.cxRightWidth);
|
||||
srcCenterWidth = srcSize.x - (sm.cxLeftWidth + sm.cxRightWidth);
|
||||
destCenterHeight = dstSize.y - (sm.cyTopHeight + sm.cyBottomHeight);
|
||||
srcCenterHeight = srcSize.y - (sm.cyTopHeight + sm.cyBottomHeight);
|
||||
|
||||
if(destCenterWidth > 0) {
|
||||
/* Center top */
|
||||
|
@ -887,7 +887,6 @@ static HRESULT UXTHEME_DrawImageBackground(HTHEME hTheme, HDC hdc, int iPartId,
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
draw_error:
|
||||
SetViewportOrgEx (hdcDst, org.x, org.y, NULL);
|
||||
|
|
Loading…
Reference in New Issue