bulenkov / Darcula

Darcula Look and Feel
Apache License 2.0
723 stars 114 forks source link

Restore JComboBox baseline calculation #18

Closed AlexFalappa closed 7 years ago

AlexFalappa commented 8 years ago

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 commented 7 years ago

Thank you Alex!