Date: 2009-08-12 13:30:12 -0700 (Wed, 12 Aug 2009)
http://bugs.adobe.com/jira/browse/SDK-20811 - VSlider doesn?\226?\128?\153t respect constaints
Here is my initial assessment of the problem:
?\226?\128?\156I've managed to get past the initial issues of the bug, which involved the difference between establishing a measured size and a minimum size. We were using minWidth and minHeight to set both of these values. But really, I want two different values for measured and minimum size. I solved that particular problem with local changes to my skins.
However, I'm still running into a problem. Specifically, the minimum size of the slider is influenced by the initial position of the thumb. For example, a HSlider has a measured width of 100 and a minimum width of 33. If the initial value of the slider puts the thumb at the right end, then the measured and minimum width end up with a value of 100. BasicLayout takes into account the x position of the thumb during the initial measurement.
Note that this minimum width remains the same even if the thumb position or slider width has changed. The reason is that changing these values doesn't trigger measurement.
Ideally, I want the thumb's minor axis position to not affect measurement or layout. I do want the thumb's dimensions to affect measurement and layout. And I want the thumb to get laid out with regards to its dimensions (I want the thumb to stretch to fit the size of the track's minor axis). Setting includeInLayout=false doesn't fit these requirements.?\226?\128?\157
The solution is twofold:
I added a height/minHeight and width/minWidth to the slider skins. In the skins, I also override the measured function. In this override, I temporarily move the thumb so that its minor axis position doesn?\226?\128?\153t affect measurement.
QE notes: Add tests for Slider smaller than default width/height of 100
Doc notes: None
Reviewer: Glenn, Evtim
Tests run: Slider
Is noteworthy for integration: No