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,
|
1821 | 1821 | |
1822 | 1822 | drawing_mode oldMode = view->DrawingMode(); |
1823 | 1823 | |
| 1824 | |
1824 | 1825 | 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 | |
1825 | 1838 | // drawing occurs on the desktop |
1826 | 1839 | if (fCachedWorkspace != current_workspace()) { |
1827 | 1840 | int8 indice = 0; |