Ticket #12576: ControlLook-DrawLabel.patch

File ControlLook-DrawLabel.patch, 1.3 KB (added by looncraz, 8 years ago)

CORRECT PATCH

  • src/kits/interface/ControlLook.cpp

    From edf980421b4f9297add417d4d82d440e68747a2e Mon Sep 17 00:00:00 2001
    From: looncraz <looncraz@looncraz.net>
    Date: Sun, 10 Jan 2016 16:38:09 -0600
    Subject: [PATCH 2/2] ControlLook - Desktop Labels
    
    Enforce use of proper colors in DrawLabel() when on the desktop.
    
    This repairs an issue where the text looks wrong in ActivityMonitor when it is a
    desktop replicant and likely other unreported issues.
    ---
     src/kits/interface/ControlLook.cpp | 13 +++++++++++++
     1 file changed, 13 insertions(+)
    
    diff --git a/src/kits/interface/ControlLook.cpp b/src/kits/interface/ControlLook.cpp
    index e4c3152..9fecb00 100644
    a b BControlLook::DrawLabel(BView* view, const char* label, const rgb_color& base,  
    18211821
    18221822    drawing_mode oldMode = view->DrawingMode();
    18231823
     1824
    18241825    if (isDesktop) {
     1826
     1827        // Enforce proper use of desktop label colors.
     1828        if(low.Brightness() < 100) {
     1829            if (textColor == NULL)
     1830                color = make_color(255, 255, 255);
     1831            glowColor = make_color(0, 0, 0);
     1832        } else {
     1833            if (textColor == NULL)
     1834                color = make_color(0, 0, 0);
     1835            glowColor = make_color(255, 255, 255);
     1836        }
     1837
    18251838        // drawing occurs on the desktop
    18261839        if (fCachedWorkspace != current_workspace()) {
    18271840            int8 indice = 0;