From 431affe33d93e6a85ca012ecfe2a2c610637331e Mon Sep 17 00:00:00 2001
From: Freeman Lou <freemanlou2430@Yahoo.com>
Date: Thu, 5 Dec 2013 01:41:48 +0000
Subject: [PATCH] diskusage background color
---
src/apps/diskusage/PieView.cpp | 11 ++++++++---
src/apps/diskusage/PieView.h | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/apps/diskusage/PieView.cpp b/src/apps/diskusage/PieView.cpp
index 80534fd..162faff 100644
a
|
b
|
void
|
166 | 166 | PieView::AttachedToWindow() |
167 | 167 | { |
168 | 168 | fWindow = (MainWindow*)Window(); |
| 169 | if(Parent()) { |
| 170 | fBackGroundColor = Parent()->ViewColor(); |
| 171 | SetViewColor(fBackGroundColor); |
| 172 | } |
169 | 173 | } |
170 | 174 | |
171 | 175 | |
… |
… |
PieView::_DrawProgressBar(BRect updateRect)
|
353 | 357 | // Show the progress of the scanning operation. |
354 | 358 | |
355 | 359 | fMouseOverInfo.clear(); |
356 | | |
357 | | FillRect(updateRect, B_SOLID_LOW); |
| 360 | |
| 361 | SetHighColor(fBackGroundColor); |
| 362 | FillRect(updateRect, B_SOLID_HIGH); |
358 | 363 | |
359 | 364 | // Draw the progress bar. |
360 | 365 | BRect b = Bounds(); |
… |
… |
PieView::_DrawPieChart(BRect updateRect)
|
388 | 393 | |
389 | 394 | pieRect.InsetBy(kPieOuterMargin, kPieOuterMargin); |
390 | 395 | |
391 | | SetHighColor(kPieBGColor); |
| 396 | SetHighColor(fBackGroundColor); |
392 | 397 | FillRect(updateRect); |
393 | 398 | |
394 | 399 | // constraint proportions |
diff --git a/src/apps/diskusage/PieView.h b/src/apps/diskusage/PieView.h
index 4890de8..47f396d 100644
a
|
b
|
private:
|
94 | 94 | FileInfo* fClickedFile; |
95 | 95 | BPoint fLastWhere; |
96 | 96 | bool fUpdateFileAt; |
| 97 | rgb_color fBackGroundColor; |
97 | 98 | }; |
98 | 99 | |
99 | 100 | #endif // PIE_VIEW_H |