Set view color to parent's view color. No more glitches when bitmap is not set.

This commit is contained in:
plfiorini 2010-05-30 04:24:53 +00:00
parent 17fdd9b0ca
commit 9d075c91a0
2 changed files with 10 additions and 2 deletions

View File

@ -23,8 +23,6 @@ BitmapView::BitmapView(const char* name, uint32 flags)
fWidth(kMinWidth), fWidth(kMinWidth),
fHeight(kMinHeight) fHeight(kMinHeight)
{ {
// Set transparent view color
SetViewColor(B_TRANSPARENT_COLOR);
} }
@ -35,6 +33,14 @@ BitmapView::~BitmapView()
} }
void
BitmapView::AttachedToWindow()
{
// Set view color to parent's view color
SetViewColor(Parent()->ViewColor());
}
status_t status_t
BitmapView::InitCheck() BitmapView::InitCheck()
{ {

View File

@ -15,6 +15,8 @@ public:
= B_WILL_DRAW); = B_WILL_DRAW);
~BitmapView(); ~BitmapView();
virtual void AttachedToWindow();
status_t InitCheck(); status_t InitCheck();
BBitmap* Bitmap() const; BBitmap* Bitmap() const;