Tracker: Improved NavIcon spacing
* The spacing between icon and text now scales with the font size, too.
This commit is contained in:
@@ -126,7 +126,8 @@ ModelMenuItem::DrawContent()
|
|||||||
{
|
{
|
||||||
if (fDrawText) {
|
if (fDrawText) {
|
||||||
BPoint drawPoint(ContentLocation());
|
BPoint drawPoint(ContentLocation());
|
||||||
drawPoint.x += ListIconSize() + (fExtraPad ? 10 : 4);
|
drawPoint.x += ListIconSize() + ListIconSize() / 4
|
||||||
|
+ (fExtraPad ? 6 : 0);
|
||||||
if (fHeightDelta > 0)
|
if (fHeightDelta > 0)
|
||||||
drawPoint.y += ceil(fHeightDelta / 2);
|
drawPoint.y += ceil(fHeightDelta / 2);
|
||||||
Menu()->MovePenTo(drawPoint);
|
Menu()->MovePenTo(drawPoint);
|
||||||
@@ -184,7 +185,7 @@ ModelMenuItem::GetContentSize(float* width, float* height)
|
|||||||
fHeightDelta = iconSize - *height;
|
fHeightDelta = iconSize - *height;
|
||||||
if (*height < iconSize)
|
if (*height < iconSize)
|
||||||
*height = iconSize;
|
*height = iconSize;
|
||||||
*width = *width + 4 + iconSize + (fExtraPad ? 18 : 0);
|
*width = *width + iconSize / 4 + iconSize + (fExtraPad ? 18 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user