lbalazscs / Pixelitor

A desktop image editor
https://pixelitor.sourceforge.io/
GNU General Public License v3.0
182 stars 71 forks source link

[Possible bug] Selected theme is not remembered in latest source build #293

Closed Imerion closed 1 year ago

Imerion commented 1 year ago

I was testing out the new tile seamless function using the latest source build (as of two days ago) and tried switching between different themes. After relaunching the application the theme would switch back to the one I was using before.

I was thinking this might be due to me having an outdated config file, but removing the config file didn't help either.

lbalazscs commented 1 year ago

In the last "official" release (4.3.0) selecting a "theme" was an experimental feature, and even when experimental features were enabled, you could only choose between "Nimbus" and "System", because the two flat themes were not there. But in the latest source build, themes are no longer experimental and you have access to the flat themes too. The only thing is that if you switch back to the official release, those flat themes won't be available since they aren't included in the older jar file. The result will be that Pixelitor will default back to the Nimbus look.

I'd suggest always using the latest source build, as it should be pretty stable, and it has more features. It's not clear which version did you use the second time, but I suspect that intentionally or accidentally it was the old one. Could you confirm that?

Also, if you want to support the development of Pixelitor, you can help by enabling the experimental features in the latest source build and sharing your feedback. The "experimental" checkbox is now in the Preferences/Advanced section. The experimental features are layer groups, color fill layers, gradient layers, adjustment layers, smart objects and smart filters. They are described to a degree at https://pixelitor.sourceforge.io/documentation.html

Imerion commented 1 year ago

I have been using the latest source build at all times when testing this - it is the only one I have downloaded/installed. When starting Pixelitor and going to the UI preferences tab it says "Nimbus", but it is using my system theme. Choosing any other theme will switch to it until I close Pixelitor. Starting it up again will switch back to my system theme but still show Nimbus in the settings.

I will start testing the experimental features from now on! Now that there is an easy way to access new builds I will try to stay on the latest one as often as possible and make sure to test the new features well.

lbalazscs commented 1 year ago

This is strange. Can you tell me which operating system you're using? And is Pixelitor remembering other settings like the last used tool or other things from Edit/Preferences after you restart the program? If you run Pixelitor from a terminal using the command java -jar pixelitor.version.jar do you see any error messages when starting or closing the program?

It's great if you start testing the experimental features! BTW, if you like Discord, you can also give feedback there at https://discord.gg/SXaxYnBSTv

Imerion commented 1 year ago

I am using Linux (KDE Neon, based on Ubuntu 22.04) and running Pixelitor with OpenJDK 17. Other settings are saved, including last used tool. I also tried a few different ones from Preferences (zooming, panning, undo levels, etc) and these were kept. However, for some reason the setting for using system file choosers was not kept. I tested again in 4.3.0 and everything works fine there. After I have enabled experimental features theme is remembered.

Running the latest version in a terminal gives me: Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel

Perhaps Java is set to always use the GTK look? But it still seems strange since I can switch when in Pixelitor and the themes all work fine - they are just not remembered. I am also using the same configuration for 4.3.0 where it does remember.

lbalazscs commented 1 year ago

Oh, I understand it now. Your Linux distribution is set up to automatically give some command line options to Java programs, because they decided that it would be helpful for all programs. "Dswing.defaultlaf" is the standard way to specify a look and feel to a Java program on the command line.

On the other hand I assumed that only Java developers would use this option and only if they knew what they were doing. So I chose to ignore the saved settings if this option was set. Now I see that this wasn't a good idea. You don't need to change anything, the next commit should fix this.

lbalazscs commented 1 year ago

It should be OK now.

Imerion commented 1 year ago

I tested and it works great now! Thanks!