[haiku-commits] r35138 - haiku/trunk/src/apps/pulse

  • From: stpere@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 17 Jan 2010 23:51:24 +0100 (CET)

Author: stpere
Date: 2010-01-17 23:51:24 +0100 (Sun, 17 Jan 2010)
New Revision: 35138
Changeset: http://dev.haiku-os.org/changeset/35138/haiku
Ticket: http://dev.haiku-os.org/ticket/4244

Modified:
   haiku/trunk/src/apps/pulse/CPUButton.cpp
Log:
[Pulse] More compact display of the dragger in replicants. (follow-up of #4244)


Modified: haiku/trunk/src/apps/pulse/CPUButton.cpp
===================================================================
--- haiku/trunk/src/apps/pulse/CPUButton.cpp    2010-01-17 21:35:42 UTC (rev 
35137)
+++ haiku/trunk/src/apps/pulse/CPUButton.cpp    2010-01-17 22:51:24 UTC (rev 
35138)
@@ -47,7 +47,7 @@
        if (CountChildren() > 1)
                RemoveChild(ChildAt(1));
 
-       ResizeBy(-7, -7);
+       ResizeTo(CPUBUTTON_WIDTH, CPUBUTTON_HEIGHT);
 
        _InitData();
 }
@@ -93,7 +93,10 @@
        }
 
        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 @@
 
        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;


Other related posts:

  • » [haiku-commits] r35138 - haiku/trunk/src/apps/pulse - stpere