From 09196077b88565772dc0e7b0a311615abc5cd6b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 29 Jun 2005 12:26:17 +0000 Subject: [PATCH] This fixes some of the drawing bugs; those were only visible under BeOS, though (both R5 + Dano). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13344 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Slider.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 687ad04cee..68499a9179 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -1003,7 +1003,7 @@ BSlider::BarFrame() const frame.right -= 8.0f; frame.bottom = frame.top + fBarThickness; } else { - frame.left = (frame.Width() - fBarThickness) / 2.0f; + frame.left = floor((frame.Width() - fBarThickness) / 2.0f); frame.top = 12.0f + (Label() ? textHeight : 0.0f) + (fMaxLimitStr ? textHeight : 0.0f); frame.right = frame.left + fBarThickness; @@ -1017,7 +1017,7 @@ BSlider::BarFrame() const frame.right -= 7.0f; frame.bottom = frame.top + fBarThickness; } else { - frame.left = (frame.Width() - fBarThickness) / 2.0f; + frame.left = floor((frame.Width() - fBarThickness) / 2.0f); frame.top = 11.0f + (Label() ? textHeight : 0.0f) + (fMaxLimitStr ? textHeight : 0.0f); frame.right = frame.left + fBarThickness; @@ -1069,7 +1069,7 @@ BSlider::ThumbFrame() const frame.right = frame.left + 17.0f; frame.bottom = frame.top + fBarThickness + 7.0f; } else { - frame.left = (frame.Width() - fBarThickness) / 2.0f - 4; + frame.left = floor((frame.Width() - fBarThickness) / 2.0f) - 4; frame.top = (float)floor(Position() * (_MaxPosition() - _MinPosition()) + _MinPosition()) - 8.0f; frame.right = frame.left + fBarThickness + 7.0f; @@ -1084,7 +1084,7 @@ BSlider::ThumbFrame() const (MinLimitLabel() || MaxLimitLabel() ? textHeight + 4.0f : 0.0f); frame.top = frame.bottom - 7.0f; } else { - frame.left = (frame.Width() - fBarThickness) / 2.0f - 3; + frame.left = floor((frame.Width() - fBarThickness) / 2.0f) - 3; frame.top = (float)floor(Position() * (_MaxPosition() - _MinPosition())) + _MinPosition() - 6.0f; frame.right = frame.left + 7;