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
This commit is contained in:
Jonas Sundström
2007-06-05 12:09:44 +00:00
parent cf5948ae6c
commit 75159db429
+6 -1
View File
@@ -333,7 +333,7 @@ DraggableContainerIcon::DraggableContainerIcon(BRect rect, const char *name,
void void
DraggableContainerIcon::AttachedToWindow() DraggableContainerIcon::AttachedToWindow()
{ {
SetViewColor(ui_color(B_MENU_BACKGROUND_COLOR)); SetViewColor(Parent()->ViewColor());
FrameMoved(BPoint(0, 0)); FrameMoved(BPoint(0, 0));
// this decides whether to hide the icon or not // this decides whether to hide the icon or not
} }
@@ -503,7 +503,12 @@ DraggableContainerIcon::Draw(BRect /*updateRect*/)
return; return;
// Draw the icon, straddling the border // Draw the icon, straddling the border
#ifdef __HAIKU__
SetDrawingMode(B_OP_ALPHA);
SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);
#else
SetDrawingMode(B_OP_OVER); SetDrawingMode(B_OP_OVER);
#endif
float iconOffset = (Bounds().Width() - B_MINI_ICON) / 2; float iconOffset = (Bounds().Width() - B_MINI_ICON) / 2;
IconCache::sIconCache->Draw(window->TargetModel(), this, IconCache::sIconCache->Draw(window->TargetModel(), this,
BPoint(iconOffset, iconOffset), kNormalIcon, B_MINI_ICON, true); BPoint(iconOffset, iconOffset), kNormalIcon, B_MINI_ICON, true);