diff --git a/src/apps/diskusage/PieView.cpp b/src/apps/diskusage/PieView.cpp
index e3ec4e6..743a4d6 100644
a
|
b
|
PieView::Draw(BRect updateRect)
|
312 | 312 | fWindow->SetRescanEnabled(false); |
313 | 313 | } else { |
314 | 314 | _DrawPieChart(updateRect); |
| 315 | _DrawHelp(); |
315 | 316 | if (fWindow != NULL) |
316 | 317 | fWindow->SetRescanEnabled(true); |
317 | 318 | } |
… |
… |
PieView::_DrawPieChart(BRect updateRect)
|
395 | 396 | |
396 | 397 | SetHighColor(kPieBGColor); |
397 | 398 | FillRect(updateRect); |
| 399 | |
398 | 400 | |
399 | 401 | // constraint proportions |
400 | 402 | if (pieRect.Width() > pieRect.Height()) { |
… |
… |
PieView::_DrawPieChart(BRect updateRect)
|
432 | 434 | } |
433 | 435 | } |
434 | 436 | |
| 437 | void |
| 438 | PieView::_DrawHelp() |
| 439 | { |
| 440 | BFont font; |
| 441 | GetFont(&font); |
| 442 | font.SetFace(B_REGULAR_FACE); |
| 443 | font.SetSize(ceilf(font.Size() * 0.75)); |
| 444 | SetFont(&font); |
| 445 | struct font_height fh; |
| 446 | font.GetHeight(&fh); |
| 447 | |
| 448 | SetHighColor(0,0,0); |
| 449 | BString str1 = B_TRANSLATE("Click center area to zoom-out"); |
| 450 | BString str2 = B_TRANSLATE("Click outer areas to zoom-in"); |
| 451 | float width = StringWidth(str1) + (2 * kSmallVMargin); |
| 452 | float height = ceilf(fh.ascent) + ceilf(fh.descent) + ceilf(fh.leading); |
| 453 | DrawString(str1, BPoint(Bounds().Width() - width, height)); |
| 454 | width = StringWidth(str2) + (2 * kSmallVMargin); |
| 455 | height += height + 1; |
| 456 | DrawString(str2, BPoint(Bounds().Width() - width, height)); |
| 457 | } |
435 | 458 | |
436 | 459 | float |
437 | 460 | PieView::_DrawDirectory(BRect b, FileInfo* info, float parentSpan, |
diff --git a/src/apps/diskusage/PieView.h b/src/apps/diskusage/PieView.h
index 9e0d5e3..2c8d5a5 100644
a
|
b
|
private:
|
50 | 50 | void _ShowVolume(BVolume* volume); |
51 | 51 | void _DrawProgressBar(BRect updateRect); |
52 | 52 | void _DrawPieChart(BRect updateRect); |
| 53 | void _DrawHelp(); |
53 | 54 | float _DrawDirectory(BRect b, FileInfo* info, |
54 | 55 | float parentSpan, float beginAngle, |
55 | 56 | int colorIdx, int level); |