[Pulse] More compact display of the dragger in replicants. (follow-up of #4244)

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35138 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Saint-Pierre 2010-01-17 22:51:24 +00:00
parent 89af054816
commit 431bbe1cc2
1 changed files with 8 additions and 4 deletions

View File

@ -47,7 +47,7 @@ CPUButton::CPUButton(BMessage *message)
if (CountChildren() > 1)
RemoveChild(ChildAt(1));
ResizeBy(-7, -7);
ResizeTo(CPUBUTTON_WIDTH, CPUBUTTON_HEIGHT);
_InitData();
}
@ -93,7 +93,10 @@ CPUButton::Draw(BRect rect)
}
BRect bounds = Bounds();
if (!fReplicantInDeskbar) {
if (fReplicant && !fReplicantInDeskbar) {
bounds.bottom -= 4;
bounds.right -= 4;
} else if (!fReplicant) {
bounds.bottom -= 7;
bounds.right -= 7;
}
@ -311,8 +314,9 @@ CPUButton::AttachedToWindow()
if (fReplicant) {
if (strcmp(Window()->Title(), "Deskbar")) {
// return to original size
ResizeBy(7, 7);
// Make room for dragger
ResizeBy(4, 4);
_AddDragger();
} else
fReplicantInDeskbar = true;