Deskbar: create new constant kClockMargin and use it
defines the (minimum) margin between clock and replicant icons Was used in a couple different forms, now all in 1 constant
This commit is contained in:
parent
a44504a168
commit
7b7bf68d71
@ -229,9 +229,9 @@ 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 < fRightBottomReplicant.right + 12) {
|
||||
width = fRightBottomReplicant.right + 12
|
||||
if (!fTime->IsHidden() && fTime->Frame().left
|
||||
< fRightBottomReplicant.right + kClockMargin) {
|
||||
width = fRightBottomReplicant.right + kClockMargin
|
||||
+ fTime->Frame().Width();
|
||||
} else
|
||||
width = fRightBottomReplicant.right + kIconGap + kGutter;
|
||||
@ -1167,7 +1167,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
|
||||
- kDragRegionWidth * 2,
|
||||
- kClockMargin,
|
||||
loc.y + kMaxReplicantHeight);
|
||||
if (row == 0 && !fTime->IsHidden()) {
|
||||
rowRect.right -= kClockMargin + fTime->Frame().Width()
|
||||
|
@ -54,6 +54,7 @@ const int32 kIconGap = 2;
|
||||
const int32 kGutter = 1;
|
||||
const int32 kDragRegionWidth = 6;
|
||||
const int32 kTrayPadding = 3;
|
||||
const int32 kClockMargin = 12;
|
||||
|
||||
// 1 pixel for left gutter
|
||||
// space for replicant tray (6 items)
|
||||
|
Loading…
Reference in New Issue
Block a user