Home
last modified time | relevance | path

Searched hist:a44504a168548e129e58eeace336a6a2315257ad (Results 1 – 1 of 1) sorted by relevance

/haiku/src/apps/deskbar/
H A DStatusView.cppbc08a7d6c8f1a158ef2f8659a12857dc2a457a38 Thu Nov 16 23:19:54 UTC 2017 John Scipione <jscipione@gmail.com> Fix first replicant wrapping bug on wide clock

In this commit:
a44504a168548e129e58eeace336a6a2315257ad
Deskbar: Refactor TRelicantTray::LocationForReplicant()

I made the following assumption that:
* if index == 0 return right away, no calculation required.

But this assumes that the first replicant will always fit on the
same line as the clock which doesn't work if you have a wide clock.

Update to always calculate the position even of the first replicant
in vertical (multi-row) mode.

In horizontal mode we still skip some calculations for the index 0
case.

Also I was using kClockMargin (12px) for the right margin, the
right margin should be only 8px: 5px for the dragger plus 3px more
for kTrayPadding. Finally we add in the width of the clock and
extra clock margin iif we're on first row and clock is not hidden.

Fixes (hopefully the last of) #8641
a44504a168548e129e58eeace336a6a2315257ad Tue Oct 24 04:07:18 UTC 2017 John Scipione <jscipione@gmail.com> Deskbar: Refactor TRelicantTray::LocationForReplicant()

* if index == 0 return right away, no calculation required.
* rename rect to rowRect then copy it into replicantRect.
- This makes it clearer to me what's going on.
* don't have to check if index > 0 in horizontal mode anymore since
we are checking it upfront.
* introduce replicantWidth variable for understanding
* reduce indent

Was calculating the height in multi-row mode twice. Instead, use
the saved height, if that isn't set calculate height as before,
if no replicants, use minimum height (16px) and don't calculate.