From 58f263a2c5a280789cbe27e5c7ecba7d3c74dd50 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Sun, 5 Jul 2020 19:14:19 -0400 Subject: [PATCH] Tracker: Remove usage of hard-coded count view size in ContainerWindow. This makes the count view width, height, and font size properly proportional in the container window. BFilePanel is not yet fixed however. --- src/kits/tracker/ContainerWindow.cpp | 5 +---- src/kits/tracker/CountView.cpp | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index d32c314969..755e7fe1b6 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -1047,10 +1047,7 @@ BContainerWindow::InitLayout() { fBorderedView->GroupLayout()->AddView(0, fPoseView->TitleView()); - BLayoutItem* item = fCountContainer->GroupLayout()->AddView( - fPoseView->CountView()); - item->SetExplicitMinSize(BSize(kCountViewWidth, B_H_SCROLL_BAR_HEIGHT)); - item->SetExplicitMaxSize(BSize(kCountViewWidth, B_SIZE_UNSET)); + fCountContainer->GroupLayout()->AddView(fPoseView->CountView(), 0.25f); // Eliminate the extra borders fPoseContainer->GridLayout()->SetInsets(-1, 0, -1, -1); diff --git a/src/kits/tracker/CountView.cpp b/src/kits/tracker/CountView.cpp index 6a119f51fb..129992f7aa 100644 --- a/src/kits/tracker/CountView.cpp +++ b/src/kits/tracker/CountView.cpp @@ -159,7 +159,7 @@ BRect BCountView::TextInvalRect() const { BRect result = Bounds(); - result.InsetBy(4, 3); + result.InsetBy(4, 4); // if the barber pole is not present, use its space for text if (fShowingBarberPole) @@ -313,7 +313,7 @@ void BCountView::AttachedToWindow() { SetFont(be_plain_font); - SetFontSize(9); + SetFontSize(be_plain_font->Size() * 0.75f); SetViewUIColor(B_PANEL_BACKGROUND_COLOR); SetLowUIColor(ViewUIColor());