ChannelSlider: don't check be_control_look for NULL

Also if0 the code that draws the old/dano look so it's more clear that
it's not called intentionally.
This commit is contained in:
Stefano Ceccherini
2015-07-29 15:20:11 +02:00
parent 0cd38980a3
commit e716f48778
+6 -8
View File
@@ -563,7 +563,6 @@ BChannelSlider::DrawGroove(BView* into, int32 channel, BPoint leftTop,
ASSERT(into != NULL); ASSERT(into != NULL);
BRect rect(leftTop, bottomRight); BRect rect(leftTop, bottomRight);
if (be_control_look != NULL) {
rect.InsetBy(-2.5, -2.5); rect.InsetBy(-2.5, -2.5);
rect.left = floorf(rect.left); rect.left = floorf(rect.left);
rect.top = floorf(rect.top); rect.top = floorf(rect.top);
@@ -574,13 +573,14 @@ BChannelSlider::DrawGroove(BView* into, int32 channel, BPoint leftTop,
uint32 flags = 0; uint32 flags = 0;
be_control_look->DrawSliderBar(into, rect, rect, base, be_control_look->DrawSliderBar(into, rect, rect, base,
barColor, flags, Orientation()); barColor, flags, Orientation());
return;
}
#if 0
// Disabled original look
_DrawGrooveFrame(fBackingView, rect.InsetByCopy(-2.5, -2.5)); _DrawGrooveFrame(fBackingView, rect.InsetByCopy(-2.5, -2.5));
rect.InsetBy(-0.5, -0.5); rect.InsetBy(-0.5, -0.5);
into->FillRect(rect, B_SOLID_HIGH); into->FillRect(rect, B_SOLID_HIGH);
#endif
} }
@@ -598,8 +598,6 @@ BChannelSlider::DrawThumb(BView* into, int32 channel, BPoint where,
where.x -= bitmapBounds.right / 2.0; where.x -= bitmapBounds.right / 2.0;
where.y -= bitmapBounds.bottom / 2.0; where.y -= bitmapBounds.bottom / 2.0;
if (be_control_look != NULL) {
BRect rect(bitmapBounds.OffsetToCopy(where)); BRect rect(bitmapBounds.OffsetToCopy(where));
rect.InsetBy(1, 1); rect.InsetBy(1, 1);
rect.left = floorf(rect.left); rect.left = floorf(rect.left);
@@ -610,10 +608,9 @@ BChannelSlider::DrawThumb(BView* into, int32 channel, BPoint where,
uint32 flags = 0; uint32 flags = 0;
be_control_look->DrawSliderThumb(into, rect, rect, base, be_control_look->DrawSliderThumb(into, rect, rect, base,
flags, Orientation()); flags, Orientation());
return;
}
#if 0
// Disabled original look which takes into account the pressed state
into->PushState(); into->PushState();
into->SetDrawingMode(B_OP_OVER); into->SetDrawingMode(B_OP_OVER);
@@ -634,6 +631,7 @@ BChannelSlider::DrawThumb(BView* into, int32 channel, BPoint where,
} }
into->PopState(); into->PopState();
#endif
} }