From e7735d59c3b6b5d653fcb82f395fd1adc0ee5f15 Mon Sep 17 00:00:00 2001 From: John Scipione Date: Tue, 14 Jan 2025 16:33:13 -0500 Subject: [PATCH] Deskbar: A few minor style fixes to StatusView (tray) Change-Id: I89036bda8bc9b93cac90c606dafe0a13cfd8a05d Reviewed-on: https://review.haiku-os.org/c/haiku/+/8831 Haiku-Format: Haiku-format Bot Reviewed-by: waddlesplash --- src/apps/deskbar/StatusView.cpp | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/apps/deskbar/StatusView.cpp b/src/apps/deskbar/StatusView.cpp index 830bdab37d..71faacfc86 100644 --- a/src/apps/deskbar/StatusView.cpp +++ b/src/apps/deskbar/StatusView.cpp @@ -146,8 +146,8 @@ TReplicantTray::TReplicantTray(TBarView* barView) fAlignmentSupport(false) { // scale replicants by font size - fMaxReplicantHeight = std::max(gMinReplicantHeight, - float(((TBarApp*)be_app)->TeamIconSize())); + fMaxReplicantHeight + = std::max(gMinReplicantHeight, (float)static_cast(be_app)->TeamIconSize()); // but not bigger than TabHeight which depends on be_bold_font // TODO this should only apply to mini-mode but we set it once here for all fMaxReplicantHeight = std::min(fMaxReplicantHeight, @@ -164,8 +164,7 @@ TReplicantTray::TReplicantTray(TBarView* barView) } // Create the time view - fTime = new TTimeView(fMinimumTrayWidth, fMaxReplicantHeight - 1.0, - fBarView); + fTime = new TTimeView(fMinimumTrayWidth, fMaxReplicantHeight - 1, fBarView); } @@ -240,8 +239,7 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight) float height = fMinTrayHeight; if (fBarView->Vertical()) { - width = static_cast(be_app)->Settings()->width - - gDragWidth - kGutter; + width = static_cast(be_app)->Settings()->width - gDragWidth - kGutter; width = std::max(gMinimumTrayWidth, width); if (fRightBottomReplicant.IsValid()) @@ -1198,8 +1196,7 @@ TReplicantTray::LocationForReplicant(int32 index, float replicantWidth) loc.y = yOffset; } else { // align bottom - loc.y = (fBarView->TeamMenuItemHeight() + 1) - - fMaxReplicantHeight - yOffset; + loc.y = fBarView->TeamMenuItemHeight() + 1 - fMaxReplicantHeight - yOffset; } }