Now draws the nice thumb "frame"
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12270 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
347f3fa357
commit
c958e7145b
@ -452,15 +452,12 @@ BChannelSlider::DrawChannel(BView *into, int32 channel, BRect area, bool pressed
|
||||
void
|
||||
BChannelSlider::DrawGroove(BView *into, int32 channel, BPoint topLeft, BPoint bottomRight)
|
||||
{
|
||||
// TODO: Draw the real thing
|
||||
ASSERT(into != NULL);
|
||||
BRect rect(topLeft, bottomRight);
|
||||
|
||||
if (Vertical())
|
||||
rect.InsetBy(-1, 0);
|
||||
else
|
||||
rect.InsetBy(0, -1);
|
||||
DrawThumbFrame(fBackingView, rect.InsetByCopy(-2.5, -2.5));
|
||||
|
||||
rect.InsetBy(-0.5, -0.5);
|
||||
into->FillRect(rect, B_SOLID_HIGH);
|
||||
}
|
||||
|
||||
@ -689,8 +686,20 @@ BChannelSlider::DrawThumbs()
|
||||
|
||||
|
||||
void
|
||||
BChannelSlider::DrawThumbFrame(BView *where, const BRect &area)
|
||||
BChannelSlider::DrawThumbFrame(BView *into, const BRect &area)
|
||||
{
|
||||
rgb_color oldColor = into->HighColor();
|
||||
|
||||
into->SetHighColor(255, 255, 255);
|
||||
into->StrokeRect(area);
|
||||
into->SetHighColor(tint_color(into->ViewColor(), B_DARKEN_1_TINT));
|
||||
into->StrokeLine(area.LeftTop(), BPoint(area.right, area.top));
|
||||
into->StrokeLine(area.LeftTop(), BPoint(area.left, area.bottom - 1));
|
||||
into->SetHighColor(tint_color(into->ViewColor(), B_DARKEN_2_TINT));
|
||||
into->StrokeLine(BPoint(area.left + 1, area.top + 1), BPoint(area.right - 1, area.top + 1));
|
||||
into->StrokeLine(BPoint(area.left + 1, area.top + 1), BPoint(area.left + 1, area.bottom - 2));
|
||||
|
||||
into->SetHighColor(oldColor);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user