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.
This commit is contained in:
Augustin Cavalier
2020-07-05 19:14:52 -04:00
parent bdfb3cd7cd
commit 58f263a2c5
2 changed files with 3 additions and 6 deletions
+1 -4
View File
@@ -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);
+2 -2
View File
@@ -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());