comctl32: Use InflateRect() too when expanding in just one axis.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1b4e193473
commit
8258d900ca
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue