- Factor out common text shifting logic.
- Shift selected tab text up instead of down.
This commit is contained in:
parent
020c3968c6
commit
4d639be88b
|
@ -1727,14 +1727,20 @@ TAB_DrawItemInterior
|
|||
else
|
||||
drawRect->bottom-=center_offset_h;
|
||||
|
||||
center_offset_v = ((drawRect->right - drawRect->left) - (rcText.bottom - rcText.top) + infoPtr->uVItemPadding) / 2;
|
||||
center_offset_v = ((drawRect->right - drawRect->left) - (rcText.bottom - rcText.top)) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
drawRect->left += center_offset_h;
|
||||
center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top) + infoPtr->uVItemPadding) / 2;
|
||||
center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top)) / 2;
|
||||
}
|
||||
|
||||
/* if an item is selected, the text is shifted up instead of down */
|
||||
if (iItem == infoPtr->iSelected)
|
||||
center_offset_v -= infoPtr->uVItemPadding / 2;
|
||||
else
|
||||
center_offset_v += infoPtr->uVItemPadding / 2;
|
||||
|
||||
if (center_offset_v < 0)
|
||||
center_offset_v = 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue