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

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

    From dca91a3b842ba70817b128d30cdb728326129e93 Mon Sep 17 00:00:00 2001
    From: Freeman Lou <freemanlou2430@Yahoo.com>
    Date: Thu, 5 Dec 2013 15:14:38 +0000
    Subject: [PATCH] diskusage background color
    
    ---
     src/apps/diskusage/PieView.cpp | 9 +++++++--
     src/apps/diskusage/PieView.h   | 1 +
     2 files changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/src/apps/diskusage/PieView.cpp b/src/apps/diskusage/PieView.cpp
    index 80534fd..d271977 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)  
    354358
    355359    fMouseOverInfo.clear();
    356360
    357     FillRect(updateRect, B_SOLID_LOW);
     361    SetHighColor(fBackGroundColor);
     362    FillRect(updateRect);
    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