Add some padding to the time zone display.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42098 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
leavengood 2011-06-11 14:03:15 +00:00
parent d2d65a82c8
commit 5fb0d3a67a

View File

@ -158,9 +158,11 @@ TTZDisplay::_CalcPrefSize()
size.height = 2 * ceilf(fontHeight.ascent + fontHeight.descent +
fontHeight.leading);
// Add a little padding
float padding = 10.0;
float firstLine = ceilf(StringWidth(fLabel.String()) +
StringWidth(" ") + StringWidth(fTime.String()));
float secondLine = ceilf(StringWidth(fText.String()));
StringWidth(" ") + StringWidth(fTime.String()) + padding);
float secondLine = ceilf(StringWidth(fText.String()) + padding);
size.width = firstLine > secondLine ? firstLine : secondLine;
return size;
}