The vertical slider is now at least functionally working, although the rendering
code needs some love. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26444 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
f898f8af47
commit
8995071f07
@ -687,9 +687,18 @@ BSlider::SetValue(int32 value)
|
||||
int32
|
||||
BSlider::ValueForPoint(BPoint location) const
|
||||
{
|
||||
float position = fOrientation == B_HORIZONTAL ? location.x : location.y;
|
||||
float min = _MinPosition();
|
||||
float max = _MaxPosition();
|
||||
float min;
|
||||
float max;
|
||||
float position;
|
||||
if (fOrientation == B_HORIZONTAL) {
|
||||
min = _MinPosition();
|
||||
max = _MaxPosition();
|
||||
position = location.x;
|
||||
} else {
|
||||
max = _MinPosition();
|
||||
min = _MaxPosition();
|
||||
position = min + (max - location.y);
|
||||
}
|
||||
|
||||
if (position < min)
|
||||
position = min;
|
||||
|
Loading…
Reference in New Issue
Block a user