mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
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 <no-reply+haikuformatbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
853ddd218e
commit
e7735d59c3
@ -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<TBarApp*>(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<TBarApp*>(be_app)->Settings()->width
|
||||
- gDragWidth - kGutter;
|
||||
width = static_cast<TBarApp*>(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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user