From d56ff162fb9e8ca5fb3f2c86773e200d2c623c3c Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Fri, 26 Aug 2022 22:04:50 -0400 Subject: [PATCH] Tracker: Adjust metrics of the CountView. Should look the same at 12pt font but more consistent at higher font sizes. --- src/kits/tracker/CountView.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/tracker/CountView.cpp b/src/kits/tracker/CountView.cpp index bb11ab1720..d6d40988eb 100644 --- a/src/kits/tracker/CountView.cpp +++ b/src/kits/tracker/CountView.cpp @@ -159,8 +159,7 @@ BCountView::BarberPoleOuterRect() const BRect BCountView::TextInvalRect() const { - BRect result = Bounds(); - result.InsetBy(4, 3); + BRect result = TextAndBarberPoleRect(); // if the barber pole is not present, use its space for text if (fShowingBarberPole) @@ -174,7 +173,8 @@ BRect BCountView::TextAndBarberPoleRect() const { 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; } @@ -315,7 +315,7 @@ BCountView::AttachedToWindow() { SetFont(be_plain_font); SetFontSize(std::max(kMinFontSize, - floorf(be_plain_font->Size() * 0.75f))); + ceilf(be_plain_font->Size() * 0.75f))); SetViewUIColor(B_PANEL_BACKGROUND_COLOR); SetLowUIColor(ViewUIColor());