From 988e5c553f68c20d6f19d35435a137f36e29f475 Mon Sep 17 00:00:00 2001 From: Alexandre Deckner Date: Tue, 26 Feb 2008 00:17:02 +0000 Subject: [PATCH] * 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 --- src/preferences/keymap/KeymapWindow.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/preferences/keymap/KeymapWindow.cpp b/src/preferences/keymap/KeymapWindow.cpp index cb4310f90d..8df65fcbb5 100644 --- a/src/preferences/keymap/KeymapWindow.cpp +++ b/src/preferences/keymap/KeymapWindow.cpp @@ -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); -}; +}