Deskbar: Fix bug calculating position of replicant icons

...in horizontal mode.

fTime->Frame().left was not in the correct position because the
window isn't yet done resizing. Instead calculate left from the
right edge of the drag region instead.
This commit is contained in:
John Scipione 2017-10-24 21:06:18 -07:00
parent 7b7bf68d71
commit c0be54904f
1 changed files with 3 additions and 2 deletions

View File

@ -229,10 +229,11 @@ TReplicantTray::GetPreferredSize(float* preferredWidth, float* preferredHeight)
} else {
// if last replicant overruns clock then resize to accomodate
if (ReplicantCount() > 0) {
if (!fTime->IsHidden() && fTime->Frame().left
if (!fTime->IsHidden() && Bounds().right - kTrayPadding - 2
- fTime->Frame().Width() - kClockMargin
< fRightBottomReplicant.right + kClockMargin) {
width = fRightBottomReplicant.right + kClockMargin
+ fTime->Frame().Width();
+ fTime->Frame().Width() + kTrayPadding + 2;
} else
width = fRightBottomReplicant.right + kIconGap + kGutter;
}