jdmonin / JSettlers2

Java Settlers project home, downloads, and GPLv3 source code. To download the latest version as a JAR, see https://github.com/jdmonin/JSettlers2/releases/latest .
http://nand.net/jsettlers/
GNU General Public License v3.0
160 stars 63 forks source link

Problem with UI colors depending on system theme #15

Closed Fyren closed 4 years ago

Fyren commented 10 years ago

My system color theme is white text on black backgrounds. On the first few panels shown when I run JSettlers.jar, all of the buttons and fields are black text on black backgrounds. I see a few places in the source where the foreground color is explicitly set to black, but the background doesn't seem to be set besides for the green panel backgrounds. I assume the button and field background colors are defaulting to my system theme.

If I comment out, for example, the setForeground(Color.black) calls in both SOCPlayerClient and SOCConnectOrPracticePanel, then those initial buttons/fields end up with white text on black backgrounds, but of course not ones in later windows (like the actual game).

I'm using Windows, if it's relevant.

jdmonin commented 10 years ago

Thank you Fyren, I am looking into this. Which version of Windows are you using? That will make it easier to test.

Fyren commented 10 years ago

Windows 7.

jdmonin commented 10 years ago

In the past I haven't worked with high-contrast themes very much. So far in my testing, commenting out the setForeground and setBackground calls still gives me black text on black buttons and fields. I'm still working on this when I can; thanks for your patience.

jdmonin commented 7 years ago

Update: The long-term fix for this will probably rewrite the client UI to use Swing APIs for better accessibility, instead of older AWT classes.

jdmonin commented 5 years ago

Hi, if you're still following this issue, thanks for your patience :) The latest build uses Swing and tries to detect windows theme dark/light colors. If you'd like, please download that build from http://nand.net/jsettlers/beta2/ and let me know if it's better now.

Fyren commented 5 years ago

I started up a game and played a few minutes against the AI. I think everything was readable for me.

jdmonin commented 5 years ago

Thanks, that's great news. Thank you very much for taking time to test this fix to such an old issue and getting back to me!

jdmonin commented 4 years ago

Newly released v2.0.00 includes this fix. Thank you :)