comctl32/status: Calculate border for part background only when theming is off.

This is a no-op.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2022-01-20 15:17:48 +08:00 committed by Alexandre Julliard
parent 6b1c2247d0
commit 1cdea98b18
1 changed files with 9 additions and 5 deletions

View File

@ -144,16 +144,12 @@ static void
STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART *part, int itemID)
{
RECT r = part->bound;
UINT border = BDR_SUNKENOUTER;
UINT border;
HTHEME theme = GetWindowTheme (infoPtr->Self);
int themePart = SP_PANE;
int x = 0;
TRACE("part bound %s\n", wine_dbgstr_rect(&r));
if (part->style & SBT_POPOUT)
border = BDR_RAISEDOUTER;
else if (part->style & SBT_NOBORDERS)
border = 0;
if (theme)
{
@ -163,7 +159,15 @@ STATUSBAR_DrawPart (const STATUS_INFO *infoPtr, HDC hdc, const STATUSWINDOWPART
DrawThemeBackground(theme, hdc, themePart, 0, &r, NULL);
}
else
{
if (part->style & SBT_POPOUT)
border = BDR_RAISEDOUTER;
else if (part->style & SBT_NOBORDERS)
border = 0;
else
border = BDR_SUNKENOUTER;
DrawEdge(hdc, &r, border, BF_RECT|BF_ADJUST);
}
if (part->hIcon) {
INT cy = r.bottom - r.top;