From 94cc40b15ee49f616c73886d2596475990e10c48 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Mon, 6 Jul 2020 22:23:36 -0400 Subject: [PATCH] Tracker: Add a minimum font size for the count view. Based on the logic from the title view. --- src/kits/tracker/CountView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/CountView.cpp b/src/kits/tracker/CountView.cpp index 129992f7aa..8984741b65 100644 --- a/src/kits/tracker/CountView.cpp +++ b/src/kits/tracker/CountView.cpp @@ -56,6 +56,7 @@ All rights reserved. const bigtime_t kBarberPoleDelay = 500000; +static const float kMinFontSize = 8.0f; // #pragma mark - BCountView @@ -313,7 +314,8 @@ void BCountView::AttachedToWindow() { SetFont(be_plain_font); - SetFontSize(be_plain_font->Size() * 0.75f); + SetFontSize(std::max(kMinFontSize, + floorf(be_plain_font->Size() * 0.75f))); SetViewUIColor(B_PANEL_BACKGROUND_COLOR); SetLowUIColor(ViewUIColor());