Commit 8258d900 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

comctl32: Use InflateRect() too when expanding in just one axis.

parent 1b4e1934
......@@ -730,8 +730,7 @@ REBAR_CalcHorzBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
lpBand->fDraw |= DRAW_GRIPPER;
lpBand->rcGripper.left += REBAR_PRE_GRIPPER;
lpBand->rcGripper.right = lpBand->rcGripper.left + GRIPPER_WIDTH;
lpBand->rcGripper.top += 2;
lpBand->rcGripper.bottom -= 2;
InflateRect(&lpBand->rcGripper, 0, -2);
SetRect (&lpBand->rcCapImage,
lpBand->rcGripper.right+REBAR_ALWAYS_SPACE, lpBand->rcBand.top,
......@@ -859,8 +858,7 @@ REBAR_CalcVertBand (const REBAR_INFO *infoPtr, UINT rstart, UINT rend)
}
else {
/* horizontal gripper */
lpBand->rcGripper.left += 2;
lpBand->rcGripper.right -= 2;
InflateRect(&lpBand->rcGripper, -2, 0);
lpBand->rcGripper.top += REBAR_PRE_GRIPPER;
lpBand->rcGripper.bottom = lpBand->rcGripper.top + GRIPPER_WIDTH;
......
......@@ -1618,8 +1618,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
if (iItem != infoPtr->iSelected)
{
drawRect->left += 2;
drawRect->top += 2;
drawRect->bottom -= 2;
InflateRect(drawRect, 0, -2);
}
}
else if (infoPtr->dwStyle & TCS_VERTICAL)
......@@ -1630,9 +1629,8 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
}
else
{
drawRect->top += 2;
drawRect->right -= 2;
drawRect->bottom -= 2;
InflateRect(drawRect, 0, -2);
}
}
else if (infoPtr->dwStyle & TCS_BOTTOM)
......@@ -1715,10 +1713,7 @@ TAB_DrawItemInterior(const TAB_INFO *infoPtr, HDC hdc, INT iItem, RECT *drawRect
drawRect->top += 2;
drawRect->right -= 1;
if ( iItem == infoPtr->iSelected )
{
drawRect->right -= 1;
drawRect->left += 1;
}
InflateRect(drawRect, -1, 0);
id = (UINT)GetWindowLongPtrW( infoPtr->hwnd, GWLP_ID );
......
......@@ -278,8 +278,7 @@ static void GB_draw(HTHEME theme, HWND hwnd, HDC hDC, ButtonState drawState, UIN
if (text)
{
textRect.left += 2;
textRect.right -= 2;
InflateRect(&textRect, -2, 0);
DrawThemeText(theme, hDC, BP_GROUPBOX, state, text, lstrlenW(text), 0, 0, &textRect);
HeapFree(GetProcessHeap(), 0, text);
}
......
......@@ -957,8 +957,7 @@ TOOLBAR_DrawButton (const TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr, HDC hdc,
/* calculate text position */
if (lpText)
{
rcText.left += GetSystemMetrics(SM_CXEDGE);
rcText.right -= GetSystemMetrics(SM_CXEDGE);
InflateRect(&rcText, -GetSystemMetrics(SM_CXEDGE), 0);
if (dwStyle & TBSTYLE_LIST)
{
rcText.left += infoPtr->nBitmapWidth + infoPtr->iListGap + 2;
......
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