Ticket #12566: PowerStatus-bg.patch

File PowerStatus-bg.patch, 1.1 KB (added by looncraz, 8 years ago)
  • src/apps/powerstatus/PowerStatusView.cpp

    From dc8258bb606e4d81ee491b884cde6ab565f6d813 Mon Sep 17 00:00:00 2001
    From: looncraz <looncraz@looncraz.net>
    Date: Sat, 9 Jan 2016 11:31:18 -0600
    Subject: [PATCH] PowerStatus background tint
    
    Recent changes require us to adopt the tint value for PowerStatus's
    low color as well as the ViewUIColor.
    
    This repairs the issue where the replicant's background color was lighter
    than the Deskbar's tray color.
    ---
     src/apps/powerstatus/PowerStatusView.cpp | 7 +++++--
     1 file changed, 5 insertions(+), 2 deletions(-)
    
    diff --git a/src/apps/powerstatus/PowerStatusView.cpp b/src/apps/powerstatus/PowerStatusView.cpp
    index 0b1b4aa..ef09bc2 100644
    a b PowerStatusView::AttachedToWindow()  
    120120    BView::AttachedToWindow();
    121121    AdoptParentColors();
    122122
    123     if (ViewUIColor() == B_NO_COLOR)
     123    float tint = B_NO_TINT;
     124    color_which which = ViewUIColor(&tint);
     125
     126    if (which == B_NO_COLOR)
    124127        SetLowUIColor(B_PANEL_BACKGROUND_COLOR);
    125128    else
    126         SetLowUIColor(ViewUIColor());
     129        SetLowUIColor(which, tint);
    127130
    128131    Update();
    129132}