Deskbar: replicant tray width adjust for 2 draggers

Revision of last commit, everything I said about how we needed to
use 8px instead of 12px for the drag width and replicant tray
padding was correct, BUT, because we are subtracting from the
window width setting we need to account for the width of BOTH
draggers, so it becomes 2 * 8px or 16px that needs to be
subtracted -- sorry about that.

The minimum Deskbar width was calculated to fit 6 replicant icons,
however, this calculation doesn't take into account the extra width
taken up by the recently added second dragger. Consequently only 5
16x16 replicants currently fit.

However you can expand Deskbar to fit 6 (or more) icons now so it
is not a big deal.

Would it be desirable to adjust the minimum Deskbar width to fix 6
replicant icons again?
This commit is contained in:
John Scipione 2017-11-16 16:30:19 -08:00
parent bc08a7d6c8
commit 015b5dd659

View File

@ -1165,7 +1165,7 @@ TReplicantTray::LocationForReplicant(int32 index, float replicantWidth)
// determine free space in this row
BRect rowRect(loc.x, loc.y,
loc.x + static_cast<TBarApp*>(be_app)->Settings()->width
- kTrayPadding - kDragWidth - kGutter,
- (kTrayPadding + kDragWidth + kGutter) * 2,
loc.y + kMaxReplicantHeight);
if (row == 0 && !fTime->IsHidden())
rowRect.right -= kClockMargin + fTime->Frame().Width();