* Do not draw the BMenuItem content twice. (Fixes bad anti-aliasing of labels
when applications are expanded in the Deskbar.) * Simplified setting B_OP_COPY drawing mode. * PopState() at the end of drawing, not before. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29601 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -203,8 +203,8 @@ TWindowMenuItem::Draw()
|
|||||||
|
|
||||||
DrawContent();
|
DrawContent();
|
||||||
menu->PopState();
|
menu->PopState();
|
||||||
}
|
} else
|
||||||
BMenuItem::Draw();
|
BMenuItem::Draw();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -218,7 +218,6 @@ TWindowMenuItem::DrawContent()
|
|||||||
BPoint contLoc = ContentLocation() + BPoint(kHPad, kVPad);
|
BPoint contLoc = ContentLocation() + BPoint(kHPad, kVPad);
|
||||||
// if (fExpanded)
|
// if (fExpanded)
|
||||||
// contLoc.x += kHPad;
|
// contLoc.x += kHPad;
|
||||||
menu->SetDrawingMode(B_OP_COPY);
|
|
||||||
|
|
||||||
if (fID >= 0) {
|
if (fID >= 0) {
|
||||||
menu->SetDrawingMode(B_OP_OVER);
|
menu->SetDrawingMode(B_OP_OVER);
|
||||||
@@ -235,18 +234,20 @@ TWindowMenuItem::DrawContent()
|
|||||||
contLoc.x += 8;
|
contLoc.x += 8;
|
||||||
|
|
||||||
contLoc.x += kIconRect.Width() + kLabelOffset;
|
contLoc.x += kIconRect.Width() + kLabelOffset;
|
||||||
|
|
||||||
menu->SetDrawingMode(B_OP_COPY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
menu->SetDrawingMode(B_OP_COPY);
|
||||||
|
|
||||||
contLoc.y = frame.top
|
contLoc.y = frame.top
|
||||||
+ ((frame.Height() - fTitleAscent - fTitleDescent) / 2) + 1.0f;
|
+ ((frame.Height() - fTitleAscent - fTitleDescent) / 2) + 1.0f;
|
||||||
menu->PopState();
|
|
||||||
|
|
||||||
menu->MovePenTo(contLoc);
|
menu->MovePenTo(contLoc);
|
||||||
// Set the pen color so that the label is always visible.
|
// Set the pen color so that the label is always visible.
|
||||||
menu->SetHighColor(0, 0, 0);
|
menu->SetHighColor(0, 0, 0);
|
||||||
|
|
||||||
BMenuItem::DrawContent();
|
BMenuItem::DrawContent();
|
||||||
|
|
||||||
|
menu->PopState();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user