DiskUsage: Change background color to parent one
* Fixes #7985. - GCI 2013
This commit is contained in:
committed by
Siarzhuk Zharski
parent
ab967391f4
commit
7470dfe2d3
@@ -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());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -196,7 +198,7 @@ PieView::MessageReceived(BMessage* message)
|
|||||||
Invalidate();
|
Invalidate();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kScanDone:
|
case kScanDone:
|
||||||
fWindow->EnableRescan();
|
fWindow->EnableRescan();
|
||||||
case kScanProgress:
|
case kScanProgress:
|
||||||
@@ -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;
|
||||||
@@ -563,7 +560,7 @@ PieView::_FileAt(const BPoint& where)
|
|||||||
float cy = b.top + b.Height() / 2.0;
|
float cy = b.top + b.Height() / 2.0;
|
||||||
float dx = where.x - cx;
|
float dx = where.x - cx;
|
||||||
float dy = where.y - cy;
|
float dy = where.y - cy;
|
||||||
float dist = sqrt(dx*dx + dy*dy);
|
float dist = sqrt(dx * dx + dy * dy);
|
||||||
|
|
||||||
int level;
|
int level;
|
||||||
if (dist < kPieCenterSize)
|
if (dist < kPieCenterSize)
|
||||||
@@ -731,11 +728,9 @@ 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);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -763,7 +758,7 @@ PieView::_OpenInfo(FileInfo* info, BPoint p)
|
|||||||
BMessenger tracker(kTrackerSignature);
|
BMessenger tracker(kTrackerSignature);
|
||||||
if (!tracker.IsValid()) {
|
if (!tracker.IsValid()) {
|
||||||
new InfoWin(p, info, Window());
|
new InfoWin(p, info, Window());
|
||||||
} else {
|
} else {
|
||||||
BMessage message(kGetInfo);
|
BMessage message(kGetInfo);
|
||||||
message.AddRef("refs", &info->ref);
|
message.AddRef("refs", &info->ref);
|
||||||
tracker.SendMessage(&message);
|
tracker.SendMessage(&message);
|
||||||
|
|||||||
Reference in New Issue
Block a user