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