Text Highlight Color

lostcalpolydude

Developer
Staff member
I'm on vacation right now, so I'm using OSX on my macbook instead of Windows 7. I ran into a GUI issue that I couldn't figure out the proper way to fix. When I selected an item in the Item Manager (and I assume other lists, though I didn't check thoroughly), I had dark text on a dark background color (they may have been the same color), making it impossible to read the item name. I tracked down the following code responsible for that in ListCellRendererFactory:

Code:
if ( isSelected )
{
 	setForeground( UIManager.getColor( "textHighlightText" ) );
}
This makes it look like I could set "textHighlightText" somewhere to make the text a sane color. Google pointed me to swing.properties, which I tracked down and then had no clue what to do with it. In the end I just changed the code to use color = "white"; (since I saw that it was done that way before), but I'm wondering how it's meant to be changed.
 

Winterbay

Active member
Isn't that sort of controlled by the local lookandfeel? OR am I remembering something else entirely?
 

Ethelred

Member
I'm on vacation right now, so I'm using OSX on my macbook instead of Windows 7. I ran into a GUI issue that I couldn't figure out the proper way to fix. When I selected an item in the Item Manager (and I assume other lists, though I didn't check thoroughly), I had dark text on a dark background color (they may have been the same color), making it impossible to read the item name. I tracked down the following code responsible for that in ListCellRendererFactory:

Code:
if ( isSelected )
{
     setForeground( UIManager.getColor( "textHighlightText" ) );
}
This makes it look like I could set "textHighlightText" somewhere to make the text a sane color. Google pointed me to swing.properties, which I tracked down and then had no clue what to do with it. In the end I just changed the code to use color = "white"; (since I saw that it was done that way before), but I'm wondering how it's meant to be changed.

You might want to take a look at this thread where I requested a similar feature, which was rejected. I still feel there is an inconsistency in the way mafia handles the interface, but I guess I didn't present a compelling enough argument for my case. If you do manage to figure out how to make that change, please post your patch here as I would still love to have item selection work in a more readable fashion.
 

lostcalpolydude

Developer
Staff member
Isn't that sort of controlled by the local lookandfeel? OR am I remembering something else entirely?

I assumed it was an OS configuration, probably adding a line to swing.properties (a file buried in Java's stuff). I tried adding
swing.textHighlightText="ffffff"
to the file, with no change.

I see the suggestion to use other LookAndFeel settings in that other thread, the problem is that they all suck on this computer. One of them has characters larger than the text boxes you type text into, even.

I've solved the problem for myself, and the proper solution is nontrivial to find, so I don't think I'll ever worry about this again.
 
Top