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

Restore JComboBox baseline calculation #18

Merged
merged 2 commits into from
Nov 28, 2016
Merged

Restore JComboBox baseline calculation #18

merged 2 commits into from
Nov 28, 2016

Conversation

AlexFalappa
Copy link
Contributor

Overriding and changing the getDisplaySize method in DarculaComboBoxUI has the effect of defeating the combobox display size cache in the superclass and to interfere with the claculations in the getBaseline method.
Removing the overridden getDisplaySize seems to have no negative consequences on the widget painting and layouting and restores the ability of baseline aligning a combo box with other widgets.

Example using javax.swing.GroupLayout and baseline alignment, before:
combo-before
After:
combo-after

@bulenkov
Copy link
Owner

Thank you Alex!

jmborer pushed a commit to jmborer/Darcula that referenced this pull request Nov 11, 2020
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

Successfully merging this pull request may close these issues.

2 participants