Set view color to parent's view color. No more glitches when bitmap is not set.
This commit is contained in:
parent
17fdd9b0ca
commit
9d075c91a0
|
@ -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()
|
||||||
{
|
{
|
||||||
|
|
|
@ -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;
|
||||||
|
|
Ŝarĝante…
Reference in New Issue