* now draws disabled icons fine when they are B_RGBA32

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18847 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus
2006-09-14 18:14:17 +00:00
parent 358b3c8e76
commit e20af02a1d
+11 -2
View File
@@ -120,8 +120,17 @@ ModelMenuItem::Highlight(bool hilited)
static void
DimmedIconBlitter(BView *view, BPoint where, BBitmap *bitmap, void *)
{
view->SetDrawingMode(B_OP_BLEND);
view->DrawBitmap(bitmap, where);
if (bitmap->ColorSpace() == B_RGBA32) {
rgb_color oldHighColor = view->HighColor();
view->SetHighColor(0, 0, 0, 128);
view->SetDrawingMode(B_OP_ALPHA);
view->SetBlendingMode(B_CONSTANT_ALPHA, B_ALPHA_OVERLAY);
view->DrawBitmap(bitmap, where);
view->SetHighColor(oldHighColor);
} else {
view->SetDrawingMode(B_OP_BLEND);
view->DrawBitmap(bitmap, where);
}
view->SetDrawingMode(B_OP_OVER);
}