From 75159db4292b8c8c12cfdf37964777f1ebc59640 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20Sundstr=C3=B6m?= Date: Tue, 5 Jun 2007 12:09:44 +0000 Subject: [PATCH] The menubar icon at the top-right of Tracker folder windows now uses the view color of its parent view. This fixes bug #551. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21328 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/tracker/ContainerWindow.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index a3f5bb53ce..26ff8d737b 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -333,7 +333,7 @@ DraggableContainerIcon::DraggableContainerIcon(BRect rect, const char *name, void DraggableContainerIcon::AttachedToWindow() { - SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR)); + SetViewColor(Parent()->ViewColor()); FrameMoved(BPoint(0, 0)); // this decides whether to hide the icon or not } @@ -503,7 +503,12 @@ DraggableContainerIcon::Draw(BRect /*updateRect*/) return; // Draw the icon, straddling the border +#ifdef __HAIKU__ + SetDrawingMode(B_OP_ALPHA); + SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY); +#else SetDrawingMode(B_OP_OVER); +#endif float iconOffset = (Bounds().Width() - B_MINI_ICON) / 2; IconCache::sIconCache->Draw(window->TargetModel(), this, BPoint(iconOffset, iconOffset), kNormalIcon, B_MINI_ICON, true);