DiskUsage: Change background color to parent one

* Fixes #7985.

- GCI 2013
This commit is contained in:
Freeman Lou
2013-12-10 21:25:17 +01:00
committed by Siarzhuk Zharski
parent ab967391f4
commit 7470dfe2d3
+5 -10
View File
@@ -101,8 +101,8 @@ void
AppMenuItem::GetContentSize(float* _width, float* _height) AppMenuItem::GetContentSize(float* _width, float* _height)
{ {
if (_width) if (_width)
*_width = fIcon->Bounds().Width() + *_width = fIcon->Bounds().Width()
be_plain_font->StringWidth(Label()); + be_plain_font->StringWidth(Label());
if (_height) { if (_height) {
struct font_height fh; struct font_height fh;
@@ -166,6 +166,8 @@ void
PieView::AttachedToWindow() PieView::AttachedToWindow()
{ {
fWindow = (MainWindow*)Window(); fWindow = (MainWindow*)Window();
if (Parent())
SetViewColor(Parent()->ViewColor());
} }
@@ -354,8 +356,6 @@ PieView::_DrawProgressBar(BRect updateRect)
fMouseOverInfo.clear(); fMouseOverInfo.clear();
FillRect(updateRect, B_SOLID_LOW);
// Draw the progress bar. // Draw the progress bar.
BRect b = Bounds(); BRect b = Bounds();
float bx = floorf((b.left + b.Width() - kProgBarWidth) / 2.0); float bx = floorf((b.left + b.Width() - kProgBarWidth) / 2.0);
@@ -388,9 +388,6 @@ PieView::_DrawPieChart(BRect updateRect)
pieRect.InsetBy(kPieOuterMargin, kPieOuterMargin); pieRect.InsetBy(kPieOuterMargin, kPieOuterMargin);
SetHighColor(kPieBGColor);
FillRect(updateRect);
// constraint proportions // constraint proportions
if (pieRect.Width() > pieRect.Height()) { if (pieRect.Width() > pieRect.Height()) {
float moveBy = (pieRect.Width() - pieRect.Height()) / 2; float moveBy = (pieRect.Width() - pieRect.Height()) / 2;
@@ -731,12 +728,10 @@ PieView::_ShowContextMenu(FileInfo* info, BPoint p)
fMouseOverMenu->RemoveItem(openWith); fMouseOverMenu->RemoveItem(openWith);
delete openWith; delete openWith;
} } else
else {
// The file is no longer available. // The file is no longer available.
fFileUnavailableMenu->Go(p, false, true, openRect); fFileUnavailableMenu->Go(p, false, true, openRect);
} }
}
void void