Cannot read :observer processes tab (grey font on white background)

running :observer.start from iex the processes tab shows font with light grey color that is hard to read. The system tab and others look normal (black) but various tabs with text look like this. I assume this is caused my Manjaro XFCE desktop dark theme. Anyone know why, and how to change/configure it, other than perhaps changing my desktop theme? thanks.

1 Like

Check if you can disable theming per application. Some WMs allow that.

I changed themes to various, same result. It must be something about my XFCE setup.

I also changed the default system font and tried a few other things. No change.

It might be related to some compatibility layers between whatever XFCE uses and wxWidgets, which is used by observer.

I observed similar oddities back in the days when using Eclipse in a heavily themed environment.

Most of the time, I was able to find the root cause in the eclipse codebase where color values had been hardcoded instead of using symbolic names to inherit style from the OS/WM.

I’m not sure if this is the same in your situation.

Usually I’d suggest to start the application in question as the only client to X, but I am not sure how one would do that with observer. I even had to look it up for “normal” GUI applications.

Therefore, I’d try a very lightweight WM that comes with decent or no styling at all (i3wm, awesomewm, bspwm, etc; those are known to be relatively lightweight in general). And start your application there.

This will at least tell you if the problem is with XFCE or some inherited settings.

Looks like in my version of Manjaro I have the following wxWidgets libraries installed (Arch pacman repo):
wxgtk-common
wxgtk2
wxgtk3
all are version 3.0.4-1

It happens on other WM’s as well, here it is on KDE for example:


The issue is because the list control used here is not using the system theme information, which is actually quite odd because wxWidgets is usually pretty good about not hard-coding colors, so I’m thinking someone just screwed up somewhere is all, maybe it’s a custom control or something.

Another reason why I’m thinking it’s a custom control is because here is a list widget that actually looks correct:

same for me w/XFCE.

1 Like

looks like the grey/blueish color happens right here, and then probably white somewhere else (so some kind of PR against otp should be feasible, though observer looks fine here on mac:/):

3 Likes

/me sighs

Figured, you never ever hard-code colors unless you hardcode both the foreground and background… >.>

Though preferably always use system colors so you don’t get something horrifying like garish white on a nice dark system.

2 Likes

If I have the DT theme set to eg. Xfce-4.0 (light) then start :observer, then change the theme to eg. Vertex-Maia-Dark, observer changes that window correctly to dark font on white background. But if I start :observer with the Dark theme already set it shows the white-on-white font.

2 Likes

I also noticed when I changed from Dark to Light theme, not only did it not change the white font to dark on the Processes tab, but the background text color in Memory tab turned dark creating a similar problem.
So is this a bug in observer or wxWidgets? Workaround? Thanks!

1 Like

also, dunno if it’s related but I just noticed when I start the observer in IEX it shows this:

13:39:17: Warning: Mismatch between the program and library build versions detected.
The library used 3.0 (wchar_t,compiler with C++ ABI 1011,wx containers,compatible with 2.8),
and your program used 3.0 (wchar_t,compiler with C++ ABI 1012,wx containers,compatible with 2.8).

I don’t get that warning but then again I have 2.8 installed (for other reasons as well).

It is a known issue https://bugs.erlang.org/browse/ERL-114

4 Likes

Yes, I have it on Gnome with dark theme, had a similar problem with DBeaver but was able to customize it, no such luck with observer. Though activating a row makes it readable so I just went with it :slight_smile:

Thanks. Well, known over two years ago and still not fixed. Sad.

2 Likes

I know this might come off wrong, but macOS is getting dark mode in a few months, wxwidget 3.1.x will support it https://trac.wxwidgets.org/ticket/18146 - I also believe latest OTP has added build support for wxwidgets 3.1(https://github.com/erlang/otp/pull/1768) - so I would assume this issue will get a lot more traction soon (including from me :/)

aka replace hardcoded colors with function similar to this https://github.com/wxWidgets/wxWidgets/commit/c6523f016e65e132d1677c30e983bbbc93fe4213#diff-5e2f88b3ff56dbb097334d47a12a082cR267 that then returns the color dependent on dark mode or not etc. (or do the check in erlang)

excellent opportunity to contribute to OTP, I just don’t have the time, nor the environment to reproduce currently…

I don’t have the knowledge and/or time atm to fix this, so for now I’ll just doc it somewhat, what looks like problem is with the hard coded values.

as pointed out above, using system colors as this example change:

Instead of BG_EVEN and BG_ODD in the observer code (create_attrs() fuction) below:

2 Likes