Ticket #7985: 0001-diskusage-background-color.patch

File 0001-diskusage-background-color.patch, 1.6 KB (added by Freeman, 10 years ago)
  • src/apps/diskusage/PieView.cpp

    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  
    166166PieView::AttachedToWindow()
    167167{
    168168    fWindow = (MainWindow*)Window();
     169    if(Parent()) {
     170        fBackGroundColor = Parent()->ViewColor();
     171        SetViewColor(fBackGroundColor);
     172    }
    169173}
    170174
    171175
    PieView::_DrawProgressBar(BRect updateRect)  
    353357    // Show the progress of the scanning operation.
    354358
    355359    fMouseOverInfo.clear();
    356 
    357     FillRect(updateRect, B_SOLID_LOW);
     360   
     361    SetHighColor(fBackGroundColor);
     362    FillRect(updateRect, B_SOLID_HIGH);
    358363
    359364    // Draw the progress bar.
    360365    BRect b = Bounds();
    PieView::_DrawPieChart(BRect updateRect)  
    388393
    389394    pieRect.InsetBy(kPieOuterMargin, kPieOuterMargin);
    390395
    391     SetHighColor(kPieBGColor);
     396    SetHighColor(fBackGroundColor);
    392397    FillRect(updateRect);
    393398
    394399    // constraint proportions
  • src/apps/diskusage/PieView.h

    diff --git a/src/apps/diskusage/PieView.h b/src/apps/diskusage/PieView.h
    index 4890de8..47f396d 100644
    a b private:  
    9494            FileInfo*           fClickedFile;
    9595            BPoint              fLastWhere;
    9696            bool                fUpdateFileAt;
     97            rgb_color           fBackGroundColor;
    9798};
    9899
    99100#endif // PIE_VIEW_H