Commit aa57ad37 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

comctl32: A couple fixes for tab icon offsets.

- Shift selected icons up and non-selected icons down. - Add the top or left draw rect to the vertical offset, because it may not be zero.
parent bed3d4d3
......@@ -1747,14 +1747,20 @@ TAB_DrawItemInterior
if(lStyle & TCS_VERTICAL)
{
center_offset_h = ((drawRect->bottom - drawRect->top) - (cy + infoPtr->uHItemPadding + (rcText.right - rcText.left))) / 2;
center_offset_v = ((drawRect->right - drawRect->left) - (cx + infoPtr->uVItemPadding)) / 2;
center_offset_v = (drawRect->left + (drawRect->right - drawRect->left) - cx) / 2;
}
else
{
center_offset_h = ((drawRect->right - drawRect->left) - (cx + infoPtr->uHItemPadding + (rcText.right - rcText.left))) / 2;
center_offset_v = ((drawRect->bottom - drawRect->top) - (cy + infoPtr->uVItemPadding)) / 2;
center_offset_v = (drawRect->top + (drawRect->bottom - drawRect->top) - cy) / 2;
}
/* if an item is selected, the icon is shifted up instead of down */
if (iItem == infoPtr->iSelected)
center_offset_v -= infoPtr->uVItemPadding / 2;
else
center_offset_v += infoPtr->uVItemPadding / 2;
if (lStyle & TCS_FIXEDWIDTH && lStyle & (TCS_FORCELABELLEFT | TCS_FORCEICONLEFT))
center_offset_h = infoPtr->uHItemPadding;
......
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