* Don't do anything in SetOrientation() if orientation is the same as the
current one. * When calculating the thumb and bar frames, handle the case when the object doesn't have a label, but does have an update text. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27493 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1177,7 +1177,7 @@ BSlider::BarFrame() const
|
||||
|
||||
if (Orientation() == B_HORIZONTAL) {
|
||||
frame.left = thumbInset;
|
||||
frame.top = 6.0 + (Label() ? textHeight + 4.0 : 0.0);
|
||||
frame.top = 6.0 + (Label() || fUpdateText ? textHeight + 4.0 : 0.0);
|
||||
frame.right -= thumbInset;
|
||||
frame.bottom = frame.top + fBarThickness;
|
||||
} else {
|
||||
@@ -1241,7 +1241,7 @@ BSlider::ThumbFrame() const
|
||||
if (Orientation() == B_HORIZONTAL) {
|
||||
frame.left = floorf(Position() * (_MaxPosition()
|
||||
- _MinPosition()) + _MinPosition()) - 8;
|
||||
frame.top = 2 + (Label() ? textHeight + 4 : 0);
|
||||
frame.top = 2 + (Label() || fUpdateText ? textHeight + 4 : 0);
|
||||
frame.right = frame.left + 17;
|
||||
frame.bottom = frame.top + fBarThickness + 7;
|
||||
} else {
|
||||
@@ -1487,6 +1487,9 @@ BSlider::Orientation() const
|
||||
void
|
||||
BSlider::SetOrientation(orientation posture)
|
||||
{
|
||||
if (fOrientation == posture)
|
||||
return;
|
||||
|
||||
fOrientation = posture;
|
||||
InvalidateLayout();
|
||||
Invalidate();
|
||||
|
||||
Reference in New Issue
Block a user