Fix text on active tabs being clipped (multi-line)

This commit is contained in:
AngryGamer 2017-03-18 18:34:26 -07:00 committed by Don Ho
parent 07a565e935
commit b7a560c012

View File

@ -857,6 +857,19 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct)
rect.bottom += paddingDynamicTwoY;
}
}
// the active tab's text with TCS_BUTTONS is lower than normal and gets clipped
if (::GetWindowLongPtr(_hSelf, GWL_STYLE) & TCS_BUTTONS)
{
if (_isVertical)
{
rect.left -= 2;
}
else
{
rect.top -= 2;
}
}
// draw highlights on tabs (top bar for active tab / darkened background for inactive tab)
RECT barRect = rect;