Tracker: Draw pop up indicator on count view
Change-Id: I22143cc361b8c70a3e92eab0621b02731554fe67
This commit is contained in:
@@ -265,6 +265,11 @@ BCountView::Draw(BRect updateRect)
|
|||||||
|
|
||||||
BRect textRect(TextInvalRect());
|
BRect textRect(TextInvalRect());
|
||||||
|
|
||||||
|
// leave room for pop up indicator
|
||||||
|
float popUpWidth = be_control_look->DefaultItemSpacing();
|
||||||
|
if (!fPoseView->TargetModel()->IsRoot())
|
||||||
|
textRect.right -= popUpWidth;
|
||||||
|
|
||||||
int32 truncateMode;
|
int32 truncateMode;
|
||||||
if (IsTypingAhead())
|
if (IsTypingAhead())
|
||||||
truncateMode = B_TRUNCATE_BEGINNING;
|
truncateMode = B_TRUNCATE_BEGINNING;
|
||||||
@@ -284,6 +289,15 @@ BCountView::Draw(BRect updateRect)
|
|||||||
MovePenTo(textRect.LeftBottom());
|
MovePenTo(textRect.LeftBottom());
|
||||||
DrawString(itemString.String());
|
DrawString(itemString.String());
|
||||||
|
|
||||||
|
// draw pop up indicator
|
||||||
|
if (!fPoseView->TargetModel()->IsRoot()) {
|
||||||
|
BRect arrowRect(bounds);
|
||||||
|
arrowRect.left = bounds.right - popUpWidth;
|
||||||
|
float fgTint = (color.IsLight() ? B_DARKEN_4_TINT : 2.f - B_DARKEN_4_TINT);
|
||||||
|
be_control_look->DrawArrowShape(this, arrowRect, updateRect, color,
|
||||||
|
BControlLook::B_DOWN_ARROW, 0, fgTint);
|
||||||
|
}
|
||||||
|
|
||||||
bounds.top++;
|
bounds.top++;
|
||||||
|
|
||||||
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_MAX_TINT);
|
rgb_color light = tint_color(ViewColor(), B_LIGHTEN_MAX_TINT);
|
||||||
|
|||||||
Reference in New Issue
Block a user