From b7aac5d21e3f7efd6038c1ff111edac6a9f9e683 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 12 Oct 2014 16:42:22 +0200 Subject: [PATCH] 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. --- src/kits/interface/Dragger.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kits/interface/Dragger.cpp b/src/kits/interface/Dragger.cpp index eba048ee40..1022db13b4 100644 --- a/src/kits/interface/Dragger.cpp +++ b/src/kits/interface/Dragger.cpp @@ -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);