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

It looks like click on a label for a checkbox is not dispatched in darklaf #24

Closed
vlsi opened this issue Feb 14, 2020 · 7 comments
Closed
Labels
bug Something isn't working

Comments

@vlsi
Copy link
Contributor

vlsi commented Feb 14, 2020

I have tried to apply darklaf to Apache JMeter, and below are some samples.
The issue I have is checkboxes and radioboxes can not be flipped by clicking on the relevant labels.

For instance, here's the code that creates radio buttons:
https://github.com/apache/jmeter/blob/b6d11d79d905d0c099732bb928d2372fd1388981/src/components/src/main/java/org/apache/jmeter/sampler/gui/TestActionGui.java#L210

With other LaFs (e.g. Darcula) I can click on labels like Infinite, Continue, Stop Test, and they alter the checkboxes.

PS. I can't build darklaf as it fails with windows.h not found (I use macOS)

Apache JMeter with bulenkov/darcula:
jmeter_darcula

Apache JMeter with weisJ/darflaf/darcula (it is strange the menu is not moved to Apple's menu):
darklaf_darcula

Apache JMeter with weisJ/darflaf/IntelliJ (just in case):
darklaf_intellij

@weisJ
Copy link
Owner

weisJ commented Feb 14, 2020

This should be fixed in ffc248f. I will upload a new version later this day or tomorrow.

@weisJ
Copy link
Owner

weisJ commented Feb 14, 2020

The menu bar not being in the OsX menu bar is indeed odd. Could you tell me the value of System.getProperty("apple.laf.useScreenMenuBar","false") on your machine?

@weisJ weisJ added the bug Something isn't working label Feb 15, 2020
@vlsi
Copy link
Contributor Author

vlsi commented Feb 15, 2020

Could you tell me the value of System.getProperty("apple.laf.useScreenMenuBar","false") on your machine?

It is set. As you see on the screenshots above it does work (see bulenkov/darcula where the menu is not present). I launch JMeter with exactly the same command, and the only difference is different themes.

Note: the application itself does not modify useScreenMenuBar property, and the property is passed during the startup: https://github.com/apache/jmeter/blob/cfb2bd92acf19123ae8a0de32ca60a46f5a85043/src/dist/build.gradle.kts#L520

@vlsi
Copy link
Contributor Author

vlsi commented Feb 15, 2020

Ok. I was able to execute ./gradlew jar, and I confirm checkboxes and radios work as expected now.

Thanks for the quick fix.

@weisJ
Copy link
Owner

weisJ commented Feb 15, 2020

I think I have solved what caused the menu to be misplaced. Could you try it out to confirm this? (ac9de65)

Also labels should now have the correct disabled text colour applied to them (c23556c).

@weisJ
Copy link
Owner

weisJ commented Feb 15, 2020

In the screenshot the comment text area has the wrong background outside the border.
This is fixed with af25c7d.

@vlsi
Copy link
Contributor Author

vlsi commented Feb 15, 2020

@weisJ , that is interesting.
Frankly speaking, the border around textarea has workaround in JMeter.

By default Swing does not put the border around textarea, so JMeter adds its own border.

Will check shortly.

@weisJ weisJ closed this as completed Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants