Skip to content
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

Allow select Widget Style default #94

Closed
jEsuSdA opened this issue Apr 3, 2020 · 12 comments
Closed

Allow select Widget Style default #94

jEsuSdA opened this issue Apr 3, 2020 · 12 comments

Comments

@jEsuSdA
Copy link

jEsuSdA commented Apr 3, 2020

Hi!
I just discovered Pixelitor and I think it has a great potential for newbies. Very good job!

But I have some suggestions. The first one is not to force widget style and let users setting the system one.

Pixelitor shows the "aqua" style and does not integrate very well with other desktop and apps. I expected to let Java to use my default settings.

Could you add a command line or preferences option to disable the forced widget style and let Pixelitor using the environment defined one?

Thanks a lot.

@lbalazscs
Copy link
Owner

Pixelitor currently uses the Java Swing "look and feel" called "Nimbus".

In principle it would be possible to support multiple look and feels, and in fact the first versions of Pixelitor (10 years ago...) had this, but then it turned out that some custom widgets have problems, and I turned this feature off. As an illustration, the following screenshot shows how Pixelitor would look like with the "Windows System" look and feel.

lfproblems

So it's not enough to simply enable other look and feels, but it is also necessary to fix these problems. Actually recently I started thinking about a dark theme, but a decent dark theme is not possible with Nimbus, so this feature is definitely something that could happen, but probably not very soon, since all the related problems also have to be solved first.

@jEsuSdA
Copy link
Author

jEsuSdA commented Apr 3, 2020

I understand.
But, I mean not to INCLUDE new themes but allow using DEFAULT java environment theme instead of forcing one.

Here an example of another JAVA app running on my GNU/Linux XFCE desktop:
imagen
As you can see, it detects the GTK environment and loads the default GTK java widgets and integrates very well with the other apps.
Here the same app with a native one:

imagen

It is not perfect (for example java does not detect the correct fonts size ), but the font rendering is soft and the widgets and buttons are very good looking.

Compare with this:
imagen

The fonts, the buttons and the background are totally different.

Please, consider to add some tweak to allow lauch Pixelitor without forcing any theme (a commandline option should be valid).

Thanks a lot!!

@lbalazscs
Copy link
Owner

Yes, I understood you the first time. The Nimbus theme is forced because right now Pixelitor doesn't work perfectly with other themes (as you can see in my screenshot). I know that there are other Java apps (with simpler GUIs) that work with any theme, but Pixelitor has some advanced custom widgets, which cause problems.

BTW, if you can build your own Pixelitor (I don't know if you built your jar, or you simply edited the jar with a zip editor), you can go to the src/main/java/pixelitor/Pixelitor.java file, delete the lines

            UIManager.setLookAndFeel(
                    "javax.swing.plaf.nimbus.NimbusLookAndFeel");

and add instead here the line

UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

But something like this will be part of the "official release" only after I fixed the problems shown in my screenshot

@jEsuSdA
Copy link
Author

jEsuSdA commented Apr 3, 2020

@lbalazscs, How can I build Pixelitor from sources?
Could you provide me a Pixelitor built with this por testing purposes?
Thanks a lot!

@lbalazscs
Copy link
Owner

I updated the main GitHub page (https://github.com/lbalazscs/Pixelitor) so that it contains instructions for building Pixelitor from the command line. Let me know if you are having any difficulty!

@jEsuSdA
Copy link
Author

jEsuSdA commented Apr 4, 2020

Error while building:

[INFO] Tests run: 13, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 s - in pixelitor.transform.TransformHelperTest
[INFO] Running pixelitor.tools.transform.TransformBoxTest
[ERROR] Tests run: 8, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.08 s <<< FAILURE! - in pixelitor.tools.transform.TransformBoxTest
[ERROR] pixelitor.tools.transform.TransformBoxTest.cursorAfterTurnedInsideOut  Time elapsed: 0.016 s  <<< FAILURE!
java.lang.AssertionError: expected 'Southwest Resize Cursor', found 'Cursor de Cambio de Tamaño Suroeste'
	at pixelitor.tools.transform.TransformBoxTest.cursorAfterTurnedInsideOut(TransformBoxTest.java:276)

[ERROR] pixelitor.tools.transform.TransformBoxTest.pureRotation  Time elapsed: 0.005 s  <<< FAILURE!
java.lang.AssertionError: expected 'Northwest Resize Cursor', found 'Cursor de Cambio de Tamaño Noroeste'
	at pixelitor.tools.transform.TransformBoxTest.pureRotation(TransformBoxTest.java:220)

@lbalazscs
Copy link
Owner

It seems that the tests are also assuming English language... I will investigate this, but for now as a workaround you can tell Maven to skip the tests by running mvn -Dmaven.test.skip=true clean package (instead of mvn clean package)

Skipping the tests is good anyway, as long as you don't make code changes, because it saves some time. (Changing the properties files can't create bugs.)

@lbalazscs
Copy link
Owner

I pushed a change (f442d63) to GitHub, now the tests should also run fine with the latest version.

@jEsuSdA
Copy link
Author

jEsuSdA commented Apr 4, 2020

Thanks a lot, @lbalazscs !!!

I was able build the project. Look at this:

Captura de pantalla_2020-04-04_17-59-41

It looks like so beautiful, but, sadly, as you mention before, there are some interface issues.
But I'm very happy, cause the result is very good looking. It will be great when you could solve the issues and environment theme could be used.

Thanks a lot for your job!!

P.D.: I saw your message about translations. I try to send you a translation as soon I can. ;)

@lbalazscs
Copy link
Owner

I'm glad you like it :)
I checked in a new version, where you can set the theme (and the language) from the preferences. (The interface issues are still unsolved, but I am optimistic)

@jEsuSdA
Copy link
Author

jEsuSdA commented Apr 5, 2020

It works awesome!
Thanks a lot, @lbalazscs ! ;)

@lbalazscs
Copy link
Owner

The just released Pixelitor 4.3.0 can select the "System" theme if "experimental" settings are enabled (both settings are in Preferences)
I'm closing this issue, possible problems with the system theme should the reported in a new, different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants