TheThirdOne / rars

RARS -- RISC-V Assembler and Runtime Simulator
Other
1.14k stars 217 forks source link

MessagesPane: Force black text color on yellow selection #192

Closed privat closed 9 months ago

privat commented 10 months ago

When using different swing look and feel (LAF), the yellow highlight on assembly error can make the message hard to read if the LAF uses the white color for selected texts.

A simple solution is to force the black text, so it is readable on a yellow background.

Note: I use the following to run rars with flatlaf

java -cp "lib/flatlaf-3.1.1.jar:rars.jar" -Dswing.defaultlaf=com.formdev.flatlaf.FlatIntelliJLaf rars.Launch
TheThirdOne commented 9 months ago

Looks good. Given that the yellow does not respect look and feel, it makes sense to also override the text color.