Bug - Fixed What happened to my Macintosh program?

Veracity

Developer
Staff member
I did nothing, near as I can tell, other than upgrade from 9952 to 9954, but the whole appearance of the program is different. It no longer looks like a Macintosh program:

- it does not have the red, yellow, and green bubbles to close, shrink, and grow windows. Instead, there are three little rectangles in the upper right.
- every frame has a menu bar, rather than using the global menu bar
- the fonts are different
- everything about the look-and-feel is different

As I said, I did nothing to change any look-and-feel settings. Last night, it was normal. This morning, it's all weird.
 

Theraze

Active member
It shouldn't have happened between 9952 and 9954, but in 9945, hola defaulted it to using the OS default look and feel if not explicitly set...
 

Veracity

Developer
Staff member
Thank you Theraze. I am capable of reading change logs. In fact, I studies hola's code in 9945 before I wrote this bug report.

Everything was as it ever was last night, when I was in 9952
This morning, I did a svn update and got to 9954 - and everything went to hell.

I don't even know how to "explicitly set" a look and feel.
I also don't understand why the "OS default" look and feel for a Macintosh would not be to look like, well, a Macintosh program.
 

lostcalpolydude

Developer
Staff member
I noticed a sudden change in appearance also. Maybe it didn't take effect until mafia was started a second time after this update? The first time might have set it differently, and then the setting was actually used the second time. I'm just guessing though since I don't expect to follow that code in a reasonable amount of time.
 

Theraze

Active member
To explicitly set look and feel, open Preferences, Look & Feel, then check Java L&F.

Mine is currently set to a MetalLookAndFeel, but my other options on Windows are Nimbus, Motif, Windows, and WindowsClassic.
 

roippi

Developer
- it does not have the red, yellow, and green bubbles to close, shrink, and grow windows. Instead, there are three little rectangles in the upper right.

That sounds like what it looks like when I use the "nimbus" look and feel in Windows. It's the "mac-like" L+F; I suspect the cross-platform change in r9945.

What it used to set the L+F to if you had none set:

Code:
UIManager.getSystemLookAndFeelClassName();

r9945 sets it to:

Code:
UIManager.getCrossPlatformLookAndFeelClassName();

so UIManager.getCrossPlatformLookAndFeelClassName() may be giving you Nimbus when you have the default L+F set (when what you really want is the default, Aqua). If I understand how r9945 works, even if you manually set your swingLookAndFeel preference to Aqua, it's going to revert to nimbus.
 

Veracity

Developer
Staff member
Thanks.

From the Login frame, I opened Preferences.
Under Look and Feel, the combo box was set to MetalLookAndFeel.
I set it to AquaLookAndFeel and restarted.
I now have a Macintosh program again.

While logged in, I opened preferences and examined that preference again. It is set to MetalLookAndFeel.

Looking at OptionsFrame.java, it sets the selected item in that combo box to whatever the (global) "swingLookAndFeel" setting has in it - which is "", as a result of hola's code. That apparently selects the first item in the list - MetalLookAndFeel.
 

Veracity

Developer
Staff member
Hopefully, 9955 should fix this. If you have swingLookAndFeel set to "", KoLmafia uses a system default. The OptionsFrame now displays that system default on the Look & Feel panel if the setting is "", and if you set it to whatever the system default is, it saves the setting as "".

That should allow you to have the setting as "" and have KoLmafia use whatever the system default is when you switch back and forth among OSes.
 

holatuwol

Developer
That's so weird. I specifically added it so things would work on my (admittedly older) Mac, and it did. @_@

Edit: Ah, I never opened the options window, so I guess that's why it never had a reason to reset. I see!
 
Last edited:

Winterbay

Active member
Aha! This could be the reason why ferdawoon had all his tabs go bold for no obvious reason as well then :)
 
Top