hrev54901 adds 1 changeset to branch 'master'
old head: 67eeb4db482d7419ee55702ba706265f3705106c
new head: d57b8f90e2ba38f2b57afb2742726ba39c45183e
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=d57b8f90e2ba+%5E67eeb4db482d
----------------------------------------------------------------------------
d57b8f90e2ba: ProcessController: fix layout when running in a window.
[ Adrien Destugues <adrien.destugues@xxxxxxxxxxxxxxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev54901
Commit: d57b8f90e2ba38f2b57afb2742726ba39c45183e
URL: https://git.haiku-os.org/haiku/commit/?id=d57b8f90e2ba
Author: Adrien Destugues <adrien.destugues@xxxxxxxxxxxxxxxxxxxxx>
Date: Wed Jan 20 17:28:37 2021 UTC
----------------------------------------------------------------------------
1 file changed, 10 insertions(+), 10 deletions(-)
src/apps/processcontroller/PCWindow.cpp | 20 ++++++++++----------
----------------------------------------------------------------------------
diff --git a/src/apps/processcontroller/PCWindow.cpp
b/src/apps/processcontroller/PCWindow.cpp
index e66766abea..e7e81773f3 100644
--- a/src/apps/processcontroller/PCWindow.cpp
+++ b/src/apps/processcontroller/PCWindow.cpp
@@ -29,16 +29,16 @@ PCWindow::PCWindow()
preferences.SaveInt32(kCurrentVersion, kVersionName);
preferences.LoadWindowPosition(this, kPosPrefName);
- system_info info;
- get_system_info(&info);
- int width = 4;
- if (info.cpu_count > 4)
- width = info.cpu_count;
- if (info.cpu_count <= 16)
- width *= 2;
+ system_info info;
+ get_system_info(&info);
+ int width = 4;
+ if (info.cpu_count > 4)
+ width = info.cpu_count;
+ if (info.cpu_count <= 16)
+ width *= 2;
- // For the memory bar
- width += 8;
+ // For the memory bar
+ width += 8;
BRect rect = Bounds();
@@ -48,7 +48,7 @@ PCWindow::PCWindow()
// set up a rectangle && instantiate a new view
// view rect should be same size as window rect but with left top at
(0, 0)
- rect.Set(0, 0, width, 15);
+ rect.Set(0, 0, width - 1, 15);
SetSizeLimits(rect.Width() + 21, rect.Width() + 21, 15 + 21, 15 + 21);
rect.OffsetTo((Bounds().Width() - 16) / 2, (Bounds().Height() - 16) /
2);