Tracker: Improved NavIcon spacing

* The spacing between icon and text now scales with the font size, too.
This commit is contained in:
Axel Dörfler 2018-11-05 22:41:32 +00:00
parent a55e9f5235
commit b791e997bf

View File

@ -126,7 +126,8 @@ ModelMenuItem::DrawContent()
{
if (fDrawText) {
BPoint drawPoint(ContentLocation());
drawPoint.x += ListIconSize() + (fExtraPad ? 10 : 4);
drawPoint.x += ListIconSize() + ListIconSize() / 4
+ (fExtraPad ? 6 : 0);
if (fHeightDelta > 0)
drawPoint.y += ceil(fHeightDelta / 2);
Menu()->MovePenTo(drawPoint);
@ -184,7 +185,7 @@ ModelMenuItem::GetContentSize(float* width, float* height)
fHeightDelta = iconSize - *height;
if (*height < iconSize)
*height = iconSize;
*width = *width + 4 + iconSize + (fExtraPad ? 18 : 0);
*width = *width + iconSize / 4 + iconSize + (fExtraPad ? 18 : 0);
}