[haiku-commits] haiku: hrev50023 - in src/kits: interface tracker

  • From: jessica.l.hamilton@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Tue, 12 Jan 2016 22:00:11 +0100 (CET)

hrev50023 adds 2 changesets to branch 'master'
old head: d3fc049b78692724ac3e82b175ef22e1250e3c7f
new head: faf00c7fa86768b87cc250f71819c5241654da46
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=faf00c7fa867+%5Ed3fc049b7869

----------------------------------------------------------------------------

a99deff476c9: Tracker Desktop Icons Using Wrong Text Color
  
  Was using the panel color without checking if we were the desktop view.
  This corrects the reported issue where icon label outlines would look
  incorrect.
  
  Signed-off-by: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>

faf00c7fa867: 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.
  
  Fixes #12576.
  
  Signed-off-by: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>

                                        [ looncraz <looncraz@xxxxxxxxxxxx> ]

----------------------------------------------------------------------------

2 files changed, 14 insertions(+)
src/kits/interface/ControlLook.cpp | 11 +++++++++++
src/kits/tracker/TextWidget.cpp    |  3 +++

############################################################################

Commit:      a99deff476c965c22b7935c35aa42a74f228f9d0
URL:         http://cgit.haiku-os.org/haiku/commit/?id=a99deff476c9
Author:      looncraz <looncraz@xxxxxxxxxxxx>
Date:        Sun Jan 10 20:41:11 2016 UTC
Committer:   Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Commit-Date: Tue Jan 12 20:25:00 2016 UTC

Tracker Desktop Icons Using Wrong Text Color

Was using the panel color without checking if we were the desktop view.
This corrects the reported issue where icon label outlines would look
incorrect.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/kits/tracker/TextWidget.cpp b/src/kits/tracker/TextWidget.cpp
index 6762395..ae8f35d 100644
--- a/src/kits/tracker/TextWidget.cpp
+++ b/src/kits/tracker/TextWidget.cpp
@@ -576,6 +576,9 @@ BTextWidget::Draw(BRect eraseRect, BRect textRect, float, 
BPoseView* view,
                drawView->GetFont(&font);
 
                rgb_color textColor = ui_color(B_PANEL_TEXT_COLOR);
+               if (view->IsDesktopWindow())
+                       textColor = view->DeskTextColor();
+
                if (textColor.Brightness() < 100) {
                        // dark text on light outline
                        rgb_color glowColor = ui_color(B_SHINE_COLOR);

############################################################################

Revision:    hrev50023
Commit:      faf00c7fa86768b87cc250f71819c5241654da46
URL:         http://cgit.haiku-os.org/haiku/commit/?id=faf00c7fa867
Author:      looncraz <looncraz@xxxxxxxxxxxx>
Date:        Sun Jan 10 22:38:09 2016 UTC
Committer:   Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>
Commit-Date: Tue Jan 12 20:25:01 2016 UTC

Ticket:      https://dev.haiku-os.org/ticket/12576

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.

Fixes #12576.

Signed-off-by: Jessica Hamilton <jessica.l.hamilton@xxxxxxxxx>

----------------------------------------------------------------------------

diff --git a/src/kits/interface/ControlLook.cpp 
b/src/kits/interface/ControlLook.cpp
index e4c3152..931baf1 100644
--- a/src/kits/interface/ControlLook.cpp
+++ b/src/kits/interface/ControlLook.cpp
@@ -1822,6 +1822,17 @@ BControlLook::DrawLabel(BView* view, const char* label, 
const rgb_color& base,
        drawing_mode oldMode = view->DrawingMode();
 
        if (isDesktop) {
+               // Enforce proper use of desktop label colors.
+               if(low.Brightness() < 100) {
+                       if (textColor == NULL)
+                               color = make_color(255, 255, 255);
+                       glowColor = make_color(0, 0, 0);
+               } else {
+                       if (textColor == NULL)
+                               color = make_color(0, 0, 0);
+                       glowColor = make_color(255, 255, 255);
+               }
+
                // drawing occurs on the desktop
                if (fCachedWorkspace != current_workspace()) {
                        int8 indice = 0;


Other related posts:

  • » [haiku-commits] haiku: hrev50023 - in src/kits: interface tracker - jessica . l . hamilton