Tracker: Adjust metrics of the CountView.
Should look the same at 12pt font but more consistent at higher font sizes.
This commit is contained in:
@@ -159,8 +159,7 @@ BCountView::BarberPoleOuterRect() const
|
|||||||
BRect
|
BRect
|
||||||
BCountView::TextInvalRect() const
|
BCountView::TextInvalRect() const
|
||||||
{
|
{
|
||||||
BRect result = Bounds();
|
BRect result = TextAndBarberPoleRect();
|
||||||
result.InsetBy(4, 3);
|
|
||||||
|
|
||||||
// if the barber pole is not present, use its space for text
|
// if the barber pole is not present, use its space for text
|
||||||
if (fShowingBarberPole)
|
if (fShowingBarberPole)
|
||||||
@@ -174,7 +173,8 @@ BRect
|
|||||||
BCountView::TextAndBarberPoleRect() const
|
BCountView::TextAndBarberPoleRect() const
|
||||||
{
|
{
|
||||||
BRect result = Bounds();
|
BRect result = Bounds();
|
||||||
result.InsetBy(4, 3);
|
result.InsetBy(be_control_look->ComposeSpacing(B_USE_SMALL_SPACING) / 2,
|
||||||
|
floorf(result.Height() * 0.25f));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -315,7 +315,7 @@ BCountView::AttachedToWindow()
|
|||||||
{
|
{
|
||||||
SetFont(be_plain_font);
|
SetFont(be_plain_font);
|
||||||
SetFontSize(std::max(kMinFontSize,
|
SetFontSize(std::max(kMinFontSize,
|
||||||
floorf(be_plain_font->Size() * 0.75f)));
|
ceilf(be_plain_font->Size() * 0.75f)));
|
||||||
|
|
||||||
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
|
||||||
SetLowUIColor(ViewUIColor());
|
SetLowUIColor(ViewUIColor());
|
||||||
|
|||||||
Reference in New Issue
Block a user