ProcessController: Fixed bars so they are aligned in center and scale
with the selected fonts Change-Id: I016c600d62ea28d4197f94f29ec0c372b5a87169 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1848 Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
committed by
waddlesplash
parent
d46af3075e
commit
9b695ae61d
@@ -73,8 +73,8 @@ KernelMemoryBarMenuItem::DrawBar(bool force)
|
||||
rgb_color highColor = menu->HighColor();
|
||||
|
||||
// draw the bar itself
|
||||
BRect cadre (frame.right - kMargin - kBarWidth, frame.top + 5,
|
||||
frame.right - kMargin, frame.top + 13);
|
||||
BRect cadre (frame.right - kMargin - kBarWidth, frame.top + kBarPadding,
|
||||
frame.right - kMargin, frame.bottom - kBarPadding);
|
||||
|
||||
if (fLastSum < 0)
|
||||
force = true;
|
||||
@@ -104,7 +104,6 @@ KernelMemoryBarMenuItem::DrawBar(bool force)
|
||||
menu->SetHighColor(gKernelColorSelected);
|
||||
else
|
||||
menu->SetHighColor(gKernelColor);
|
||||
// menu->SetHighColor(gKernelColor);
|
||||
menu->FillRect (r);
|
||||
}
|
||||
r.left = grenze1;
|
||||
@@ -120,7 +119,6 @@ KernelMemoryBarMenuItem::DrawBar(bool force)
|
||||
menu->SetHighColor(tint_color (kLavender, B_HIGHLIGHT_BACKGROUND_TINT));
|
||||
else
|
||||
menu->SetHighColor(kLavender);
|
||||
// menu->SetHighColor(gUserColor);
|
||||
menu->FillRect (r);
|
||||
}
|
||||
r.left = grenze2;
|
||||
|
||||
@@ -118,8 +118,8 @@ MemoryBarMenuItem::DrawBar(bool force)
|
||||
|
||||
// draw the bar itself
|
||||
|
||||
BRect rect(frame.right - kMargin - kBarWidth, frame.top + 5,
|
||||
frame.right - kMargin, frame.top + 13);
|
||||
BRect rect(frame.right - kMargin - kBarWidth, frame.top + kBarPadding,
|
||||
frame.right - kMargin, frame.bottom - kBarPadding);
|
||||
if (fWriteMemory < 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -54,8 +54,8 @@ NoiseBarMenuItem::DrawBar(bool force)
|
||||
rgb_color highColor = menu->HighColor();
|
||||
frame.right -= 24;
|
||||
frame.left = frame.right - kBarWidth;
|
||||
frame.top += 5;
|
||||
frame.bottom = frame.top + 8;
|
||||
frame.top += kBarPadding;
|
||||
frame.bottom -= kBarPadding;
|
||||
if (fBusyWaiting < 0)
|
||||
return;
|
||||
|
||||
|
||||
@@ -92,5 +92,6 @@ extern bool gInDeskbar;
|
||||
|
||||
#define kBarWidth 100
|
||||
#define kMargin 12
|
||||
#define kBarPadding 7
|
||||
|
||||
#endif // _PCVIEW_H_
|
||||
|
||||
@@ -126,8 +126,8 @@ TeamBarMenuItem::DrawBar(bool force)
|
||||
rgb_color highColor = menu->HighColor();
|
||||
frame.right -= 24;
|
||||
frame.left = frame.right-kBarWidth;
|
||||
frame.top += 5;
|
||||
frame.bottom = frame.top+8;
|
||||
frame.top += kBarPadding;
|
||||
frame.bottom -= kBarPadding;
|
||||
|
||||
if (fKernel < 0)
|
||||
return;
|
||||
|
||||
@@ -59,8 +59,8 @@ ThreadBarMenuItem::DrawBar(bool force)
|
||||
rgb_color highColor = menu->HighColor();
|
||||
frame.right -= 24;
|
||||
frame.left = frame.right - kBarWidth;
|
||||
frame.top += 3;
|
||||
frame.bottom = frame.top + 8;
|
||||
frame.top += kBarPadding;
|
||||
frame.bottom -= kBarPadding;
|
||||
if (fKernel < 0)
|
||||
return;
|
||||
|
||||
@@ -138,8 +138,6 @@ void
|
||||
ThreadBarMenuItem::GetContentSize(float* width, float* height)
|
||||
{
|
||||
BMenuItem::GetContentSize(width, height);
|
||||
// if (*height < 16)
|
||||
// *height = 16;
|
||||
*width += 10 + kBarWidth;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user