-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching GUI to System does not work #112
Comments
Are you trying a specific tag or the latest from git? I've added about 12 new look-and-feels since the 0.8.10 release If you are running the
JDK 11 however should work without adding that option. Also, can you try if an AppImage works? Thanks for the tip about removing the need to restart. I'm afk from my dev workstation until December but will look into it afterwards. |
My test above was with the zip-version 0.8.10. Tested it with Open-JDK 11.0.2 and some others, no difference. Now the new test with your option above: Added the above line to the MuWire-startupscript: After this I have the same options in the config dialog: System, Darcula, Metal Where can I select from the 12 Themes? |
To get the new themes you need to build the latest from git. However nothing has changed in the way the System theme is loaded, and I'm puzzled as to why it isn't working. When you launch the start script with JDK 11, are there any warnings in the terminal? |
No, no warnings. I tried the latest from github. Lets add again Tried to set it explicit in .config/MuWire/gui.properties: Works! But does not appear in the theme drop down. Nimbus: If anything is saved in the GUI-Dialog the set theme there is set for lnf=... in the gui.properties of course. |
Ok this does give me some clues as to what may be happening. The drop down menu is statically created and the Can you tell me more about which distribution you are using and which desktop environment? That way I should be able to reproduce in a virtual machine. |
XUbuntu 20.04.3 LTS, xfce Desktop. There is another strange thing with Swing and GTK-LnF: But on GTKLnF they are different: So maybe someone checks the available list with the name by "GTK+" to see if GTKLnF is there, this does not match if you use String.equals() what you normaly do because all other names are the same as you expect. |
Hi, in the commit referenced above I made it possible to change theme settings without restart. Also, the way the "System" theme is applied was changed, so please test and let me know if the GTK theme works correctly. A known issue is that if you have multiple MuWire windows open the theme change will get applied only to the main frame. That means the "MuWire is shutting down..." dialog will not get themed, nor will any open message composing windows, etc. |
Works: Works not: nothing happens when clicking on save, dialog does not close, gui does not change Suggestions:
|
* Fix Aluminium LnF * Add Nimbus, Metal, Motif and some system LnFs by name * Sort list of LnFs * Check if an LnF is available on the classpath on startup
In the commit referenced above I implemented all the suggestions and fixed Aluminium and Metal. Also on your system there should be a |
Sorry for late answer I was ill+busy. |
Tested under Linux with different JDKs:
Switching the GUI to "system" stays always in Swing-Design. Seems that System under Linux is not GTK, it is Metal (Ocean).
I wrote a test programm that beave the same:
UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
sets the GUI to Metal.
There should be an Gtk Option and an additional "Nimbus" Option, Nimbus looks better than Metal or Gtk.
Nimbus:
It is recommended that this is not set explicit like the others. You have to get a list of LnFs and then choose it if it exists:
https://docs.oracle.com/javase/tutorial/uiswing/lookandfeel/nimbus.html
Gtk can be set like this:
UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");
But bec. it is not available on every platform it should be set like Nimbus above and the Dialog should be dynamically created
and offer only the options that are available on the platform.
And add this after setting the LnF:
SwingUtilities.updateComponentTreeUI( yourJFramewindowRef);
then no restart after change needed.
Yes I know LnF can be set on command Line and in pref-files.
The text was updated successfully, but these errors were encountered: