ProcessController: fix bars height computation
The previous code used a fixed margin, which would lead to too small bars with small font sizes (the bar content would not even be visible). Instead, use the font height as the base for the bar height, which allows us to use the same code everywhere, no matter the menu item height (which can vary depending on if there is an icon, etc) Fixes #15391.
This commit is contained in:
@@ -116,10 +116,11 @@ MemoryBarMenuItem::DrawBar(bool force)
|
||||
BMenu* menu = Menu();
|
||||
rgb_color highColor = menu->HighColor();
|
||||
|
||||
// draw the bar itself
|
||||
BFont font;
|
||||
menu->GetFont(&font);
|
||||
BRect rect = bar_rect(frame, &font);
|
||||
|
||||
BRect rect(frame.right - kMargin - kBarWidth, frame.top + kBarPadding,
|
||||
frame.right - kMargin, frame.bottom - kBarPadding);
|
||||
// draw the bar itself
|
||||
if (fWriteMemory < 0)
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user