Re: tab: Shift selected tab text up instead of down [RESEND]
31 May
2005
31 May
'05
4:57 a.m.
+ if (iItem == infoPtr->iSelected) + center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top) - infoPtr->uVItemPadding) / 2; + else + center_offset_v = ((drawRect->bottom - drawRect->top) - (rcText.bottom - rcText.top) + infoPtr->uVItemPadding) / 2;
Wouldn't it be clearer as: center_offset_v = (drawRect->bottom - drawRect->top) + (rcText.bottom - rcText.top); if (iItem == infoPtr->iSelected) center_offset_v -= infoPtr->uVItemPadding; else center_offset_v += infoPtr->uVItemPadding; center_offset_v /= 2; That breaks up the long lines, and eliminates the common sub-expressions... Mike
7590
Age (days ago)
7590
Last active (days ago)
0 comments
1 participants
participants (1)
-
Mike McCormack