* 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:
@@ -120,8 +120,17 @@ ModelMenuItem::Highlight(bool hilited)
|
|||||||
static void
|
static void
|
||||||
DimmedIconBlitter(BView *view, BPoint where, BBitmap *bitmap, void *)
|
DimmedIconBlitter(BView *view, BPoint where, BBitmap *bitmap, void *)
|
||||||
{
|
{
|
||||||
|
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->SetDrawingMode(B_OP_BLEND);
|
||||||
view->DrawBitmap(bitmap, where);
|
view->DrawBitmap(bitmap, where);
|
||||||
|
}
|
||||||
view->SetDrawingMode(B_OP_OVER);
|
view->SetDrawingMode(B_OP_OVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user