Closed kschaefe closed 12 years ago
I'm going to need some more info on this. I tried to add som really long english words, but I guess 28 characters wasn't enough to get anything on the sliders page under test.Check. Do you have any better reproduction steps?
'gradle clean testCheckX'
My Dictionary contained JLabels with images. The images were not rendering correctly. They were approximately 150 pixels wide. It seems that on some cases the two paints happen and the result is a correctly painted slider, but sometimes only one paint occurs and the slider is partially painted because of the incorrect width.
After some digging it looks like the offending code in calculateLabelRect is a remnant from pre 5.0 days when the label on vertical sliders was rendered vertically. Now they are always horizontal. Hence this code is removed wholesale.
Vertical sliders with horizontal labels is a better design decision anyway. The "T" layout is likely intentional where the slider is small (relative to text length) and the labels are long.
Thanks.
SubstanceSliderUI line 862: if (this.slider.getOrientation() == JSlider.VERTICAL) {
Should be checking JSlider.HORIZONTAL, as the previous check was for VERTICAL. This causes UIs with large labels to have paiting problems as damaged JSlider's may not fully repaint.