* set the view color after calling BControl::AttachedToWindow since it

overrides it, thanks Axel!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24132 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexandre Deckner 2008-02-26 00:17:02 +00:00
parent 30cce27770
commit 988e5c553f
1 changed files with 8 additions and 6 deletions

View File

@ -66,7 +66,6 @@ KeymapWindow::KeymapWindow()
fMapView = new MapView(BRect(150, 9, 600, 189), "mapView", &fCurrentMap);
placeholderView->AddChild(fMapView);
fMapView->SetViewColor(B_TRANSPARENT_COLOR);
BMenuItem *item = fFontMenu->FindMarked();
if (item) {
@ -928,16 +927,19 @@ MapView::_InitOffscreen()
}
}
void
MapView::AttachedToWindow()
{
SetEventMask(B_KEYBOARD_EVENTS, 0);
fTextView->SetViewColor(255, 255, 255);
_InitOffscreen();
BControl::AttachedToWindow();
SetEventMask(B_KEYBOARD_EVENTS, 0);
SetViewColor(B_TRANSPARENT_COLOR);
fTextView->SetViewColor(255, 255, 255);
_InitOffscreen();
}
void
MapView::_DrawBackground(){
BRect r = fOffscreenView->Bounds();
@ -1587,4 +1589,4 @@ MapView::SetFontFamily(const font_family family)
{
fCurrentFont.SetFamilyAndStyle(family, NULL);
fTextView->SetFontAndColor(&fCurrentFont);
};
}