Blocks :
|
|
Relates :
|
|
Relates :
|
All controls that extend LabeledSkinBase and override computePrefWidth() or computePrefHeight() also have to override computeMinWidth() and computeMinHeight(). Otherwise you end up with issues where the minSize is too small and a control draws outside its bounds when at minimum size. For example CheckBox when the box part is higher than the text the pref height is box size + insets. The min size doesn't know about the box because its in LabeledSkinBase and not overridden so it comes out smaller. So for me the minHeight of check box is 1px smaller than the prefHeight() and it should be the same. This manifested its self in the bug RT-29645 where a checkbox was given a border and its maxSize was set to 10 which caused the checkbox to be sized at its minimum. The minimum is smaller than box+insets so border is drawn over top of box. This needs to be fixed in all controls like CheckBox and RadioButton that extend LabeledSkinBase and override computePrefWidth() or computePrefHeight(). The fix is to add overridden methods for computeMinWidth() and computeMinHeight() that do something similar to the computePrefWidth() and computePrefHeight() implementations.
|