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 <[email protected]>
Reviewed-by: waddlesplash <[email protected]>
This commit is contained in:
John Scipione
2025-01-14 22:46:39 +00:00
committed by waddlesplash
parent 853ddd218e
commit e7735d59c3
+5 -8
View File
@@ -146,8 +146,8 @@ TReplicantTray::TReplicantTray(TBarView* barView)
fAlignmentSupport(false) fAlignmentSupport(false)
{ {
// scale replicants by font size // scale replicants by font size
fMaxReplicantHeight = std::max(gMinReplicantHeight, fMaxReplicantHeight
float(((TBarApp*)be_app)->TeamIconSize())); = std::max(gMinReplicantHeight, (float)static_cast<TBarApp*>(be_app)->TeamIconSize());
// but not bigger than TabHeight which depends on be_bold_font // 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 // TODO this should only apply to mini-mode but we set it once here for all
fMaxReplicantHeight = std::min(fMaxReplicantHeight, fMaxReplicantHeight = std::min(fMaxReplicantHeight,
@@ -164,8 +164,7 @@ TReplicantTray::TReplicantTray(TBarView* barView)
} }
// Create the time view // Create the time view
fTime = new TTimeView(fMinimumTrayWidth, fMaxReplicantHeight - 1.0, fTime = new TTimeView(fMinimumTrayWidth, fMaxReplicantHeight - 1, fBarView);
fBarView);
} }
@@ -240,8 +239,7 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight)
float height = fMinTrayHeight; float height = fMinTrayHeight;
if (fBarView->Vertical()) { if (fBarView->Vertical()) {
width = static_cast<TBarApp*>(be_app)->Settings()->width width = static_cast<TBarApp*>(be_app)->Settings()->width - gDragWidth - kGutter;
- gDragWidth - kGutter;
width = std::max(gMinimumTrayWidth, width); width = std::max(gMinimumTrayWidth, width);
if (fRightBottomReplicant.IsValid()) if (fRightBottomReplicant.IsValid())
@@ -1198,8 +1196,7 @@ TReplicantTray::LocationForReplicant(int32 index, float replicantWidth)
loc.y = yOffset; loc.y = yOffset;
} else { } else {
// align bottom // align bottom
loc.y = (fBarView->TeamMenuItemHeight() + 1) loc.y = fBarView->TeamMenuItemHeight() + 1 - fMaxReplicantHeight - yOffset;
- fMaxReplicantHeight - yOffset;
} }
} }