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

JComboBox / Spinner controls are very big if component height is higher #302

Closed
Bios-Marcel opened this issue Apr 6, 2021 · 2 comments
Closed
Milestone

Comments

@Bios-Marcel
Copy link
Contributor

Bios-Marcel commented Apr 6, 2021

FlatLaf attempts to keep the height and width of the JComboBox/JSpinner controls in sync.
The Windows L&F in contrast doesn't do this. In our case, this is a problem since we offer to change the height of specific table rows (it's a tree table and each level can have different sizes, which helps making the table content easier to grasp).

Now there are certain cells where there's for example a datepicker consisting of a date and time component, meaning we have two of these combo-components in one cell. Since they are always keeping their right component parts width and height in sync, this ends up taking a lot of space, meaning the cell isn't usable.

Was this a concious decision or did it just happen to be like this? Personally I prefer the Windows way and would even default to do it that way. While it looks less slightly "clean", it's more useful.

If you need an example, I can do that too, but I hope I explained it good enough :D (Will do it tomorrow then, it's late)

grafik

DevCharly added a commit that referenced this issue Apr 6, 2021
@DevCharly
Copy link
Collaborator

Thx. Fixed in main branch.

The width of the arrow button is now the preferred height of the combobox/spinner,
which keeps it square in normal cases.

image

@DevCharly DevCharly added this to the 1.1.2 milestone Apr 7, 2021
@Bios-Marcel
Copy link
Contributor Author

Nice, thanks :)

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

No branches or pull requests

2 participants