From 431bbe1cc271dee0c97362cf6f06e2b64bc82f1e Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 17 Jan 2010 22:51:24 +0000 Subject: [PATCH] [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 --- src/apps/pulse/CPUButton.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/apps/pulse/CPUButton.cpp b/src/apps/pulse/CPUButton.cpp index 4209eb1496..826215edea 100644 --- a/src/apps/pulse/CPUButton.cpp +++ b/src/apps/pulse/CPUButton.cpp @@ -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;