From 662dc0bdc8a81c6f02ae85561992c1b00372f446 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 2 Feb 2006 18:16:57 +0000 Subject: [PATCH] This fixes the appearance when the slider is directly added to the window, ie. like it's done in Chart - didn't set the background correctly before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16208 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Slider.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Slider.cpp b/src/kits/interface/Slider.cpp index 4812a93a7d..26fc0bff3d 100644 --- a/src/kits/interface/Slider.cpp +++ b/src/kits/interface/Slider.cpp @@ -323,8 +323,11 @@ BSlider::AttachedToWindow() BControl::AttachedToWindow(); - if (view && Parent()) { - rgb_color color = Parent()->ViewColor(); + if (view) { + + rgb_color color = ViewColor(); + if (Parent() != NULL) + color = Parent()->ViewColor(); /* fOffScreenBits->Lock(); fOffScreenView->SetViewColor(color);