* Use B_DRAW_ON_CHILDREN for the Desktop pose view.
* Draw the selection rect in DrawAfterChildren(). * Call DrawAfterChildren() manually in Draw(), if B_DRAW_ON_CHILDREN is not set. This change allows replicants, in case they want to be aware of being embedded in the desktop, to use alpha blending to draw on top of the desktop pose view. For replicants which do not care, this patch changes nothing. When views with B_DRAW_ON_CHILDREN invalidate themselves, they will automatically trigger an update of children that sit on top the invalidated area, at least with our app_server. So this change works just like one would expect, ie like compositing views. Of course it should have flickering when app_server does not run in double buffered mode. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29759 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2d1f2ca799
commit
0834dd807f
@ -80,9 +80,9 @@ DesktopEntryListCollection::DesktopEntryListCollection()
|
||||
// #pragma mark -
|
||||
|
||||
|
||||
DesktopPoseView::DesktopPoseView(Model *model, BRect frame, uint32 viewMode,
|
||||
uint32 resizeMask)
|
||||
: BPoseView(model, frame, viewMode, resizeMask)
|
||||
DesktopPoseView::DesktopPoseView(Model *model, BRect frame, uint32 resizeMask,
|
||||
uint32 flags)
|
||||
: BPoseView(model, frame, resizeMask, flags | B_DRAW_ON_CHILDREN)
|
||||
{
|
||||
SetWidgetTextOutline(true);
|
||||
}
|
||||
|
@ -8101,6 +8101,14 @@ BPoseView::Draw(BRect updateRect)
|
||||
}
|
||||
DrawViewCommon(updateRect);
|
||||
|
||||
if ((Flags() & B_DRAW_ON_CHILDREN) == 0)
|
||||
DrawAfterChildren(updateRect);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
BPoseView::DrawAfterChildren(BRect updateRect)
|
||||
{
|
||||
if (fTransparentSelection && fSelectionRect.IsValid()) {
|
||||
SetDrawingMode(B_OP_ALPHA);
|
||||
SetHighColor(255, 255, 255, 128);
|
||||
|
@ -161,6 +161,7 @@ class BPoseView : public BView {
|
||||
virtual void MakeFocus(bool = true);
|
||||
virtual void MouseMoved(BPoint, uint32, const BMessage *);
|
||||
virtual void Draw(BRect update_rect);
|
||||
virtual void DrawAfterChildren(BRect update_rect);
|
||||
virtual void MouseDown(BPoint where);
|
||||
virtual void KeyDown(const char *, int32);
|
||||
virtual void Pulse();
|
||||
|
Loading…
x
Reference in New Issue
Block a user