Fix BDragger drawing when parent doesn't draw.

BDragger use some tricks to draw as a partially transparent view, it
calls the parent Draw method, then draws a partially transparent bitmap
over the resulting drawing.

This only works if the parent does somthing in the dragger area. In case
it doesn't, first fill the dragger with the parent view color, so there
is at least "something" in those pixels.

Fixes #5906.
This commit is contained in:
Adrien Destugues 2014-10-12 16:42:22 +02:00
parent ec1cee3ee8
commit b7aac5d21e

View File

@ -254,6 +254,8 @@ BDragger::Draw(BRect update)
if (Parent() != NULL && (Parent()->Flags() & B_DRAW_ON_CHILDREN) == 0) {
uint32 flags = Parent()->Flags();
Parent()->SetFlags(flags | B_DRAW_ON_CHILDREN);
SetHighColor(Parent()->ViewColor());
FillRect(Bounds());
Parent()->Draw(Frame() & ConvertToParent(update));
Parent()->Flush();
Parent()->SetFlags(flags);