Opened 7 years ago

Last modified 5 months ago

#4868 assigned bug

Appearance - "negative colors" not respected - hardcoded black text?

Reported by: m0ns00n Owned by: leavengood
Priority: normal Milestone: R1
Component: Preferences/Appearance Version: R1/alpha1
Keywords: Cc: post@…
Blocked By: #5293 Blocking: #11636
Has a Patch: no Platform: x86

Description

It seems to me that when I choose dark backgrounds in the Appearance preference application, with white text, most GUI elements still render with black text, as if black text is hard coded. The expected result would be that the GUI respects the choices made in preferences.

The result now is that dark themes with bright text is impossible to get right in Haiku.

Attachments (1)

zeta_gonx_theme.png (301.4 KB) - added by diver 5 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 5 years ago by jscipione

  • Owner changed from stippi to jscipione
  • Status changed from new to assigned

Taking ownership of this one as I'm working on the Appearance preferences pane. No promises of actually fixing this though.

comment:2 Changed 5 years ago by jscipione

  • Blocked By 5293 added

comment:3 Changed 5 years ago by leavengood

  • Component changed from User Interface to Preferences/Appearance

Changing component.

Any progress on this? I'm now doing some Appearances stuff too and am also annoyed by problems with darker color schemes.

comment:4 Changed 5 years ago by jscipione

Nice you to see you back Ryan. In ControlLook.cpp in the DrawLabel() method (line 1772 at the time of this writing) Stippi has written the prototype of how to draw a label black on a light background or white on a dark background. I assume that there must be code in Tracker to do this as well since it seems to work for text on the Desktop. To fix this bug we need to find instances of B_CONTROL_TEXT_COLOR and the other text color constants and replace them with a function call (perhaps defined in Interface Defs) that calculates the text color (black or white) from the background color as the code in ControlLook does.

With that done we can then deprecate those constants. Although I have some pending Appearance work to commit, it focuses on fixing instances where the color constants should be used to make more constants function, not deprecating constants. So feel free to do the work on this ticket if you'd like. I won't get back to this for a while now as I'm currently focused elsewhere.

comment:5 Changed 5 years ago by jscipione

  • Owner changed from jscipione to leavengood

Re-assigning this to leavengood as he indicated that he had code in progress to fix this.

comment:6 Changed 5 years ago by leavengood

In hrev44426 I fixed the menu drawing code so it takes into account the user chosen colors. I do not know if this fixes this ticket, as there may still be places which still hard code certain colors. If the person who logged this is still around could you try the latest Haiku and give some examples of where dark text is still used despite your settings?

comment:7 Changed 5 years ago by leavengood

Well I decided to just test myself and some problems which still remain:

  • Deskbar items always seem to be drawn with black text. These should probably use the menu item text.
  • The list of windows in Deskbar is also always black text.
  • The column headers in Tracker always seem to be drawn with black text. These should use the control text.

There are probably more.

comment:8 Changed 5 years ago by diver

I also noticed that StyledEdit and Tracker doesn't react on Document background. I wanted to apply Gonx theme from this screenshot:

Changed 5 years ago by diver

comment:9 Changed 22 months ago by Janus

  • Blocking 11636 added

(In #11636) Dup of #4868.

comment:10 Changed 20 months ago by stpere

In hrev49343, StyledEdit will draw background in B_DOCUMENT_BACKGROUND_COLOR and text color will default to B_DOCUMENT_TEXT_COLOR.

comment:11 Changed 5 months ago by humdinger

Is this still an issue? After looncraz SetUIColor work, it should work for all Haiku apps...

Note: See TracTickets for help on using tickets.