Slight tweak to instruction pointer highlight drawing.
- When highlighting lines that match IPs in the current stack trace, draw those which aren't from the currently selected frame in a lighter color, so as to make it more clear which is which when multiple calls are visible at once.
This commit is contained in:
@@ -206,6 +206,8 @@ struct SourceView::MarkerManager::InstructionPointerMarker : Marker {
|
|||||||
|
|
||||||
virtual void Draw(BView* view, BRect rect);
|
virtual void Draw(BView* view, BRect rect);
|
||||||
|
|
||||||
|
bool IsCurrentIP() const { return fIsCurrentIP; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void _DrawArrow(BView* view, BPoint tip, BSize size,
|
void _DrawArrow(BView* view, BPoint tip, BSize size,
|
||||||
BSize base, const rgb_color& color,
|
BSize base, const rgb_color& color,
|
||||||
@@ -1095,6 +1097,7 @@ SourceView::TextView::Draw(BRect updateRect)
|
|||||||
SetHighColor(fTextColor);
|
SetHighColor(fTextColor);
|
||||||
SetFont(&fFontInfo->font);
|
SetFont(&fFontInfo->font);
|
||||||
SourceView::MarkerManager::Marker* marker;
|
SourceView::MarkerManager::Marker* marker;
|
||||||
|
SourceView::MarkerManager::InstructionPointerMarker* ipMarker;
|
||||||
int32 markerIndex = 0;
|
int32 markerIndex = 0;
|
||||||
for (int32 i = minLine; i <= maxLine; i++) {
|
for (int32 i = minLine; i <= maxLine; i++) {
|
||||||
SetLowColor(ViewColor());
|
SetLowColor(ViewColor());
|
||||||
@@ -1109,9 +1112,16 @@ SourceView::TextView::Draw(BRect updateRect)
|
|||||||
continue;
|
continue;
|
||||||
} else if (marker->Line() == (uint32)i) {
|
} else if (marker->Line() == (uint32)i) {
|
||||||
++markerIndex;
|
++markerIndex;
|
||||||
if (dynamic_cast<SourceView::MarkerManager
|
ipMarker = dynamic_cast<SourceView::MarkerManager
|
||||||
::InstructionPointerMarker*>(marker) != NULL)
|
::InstructionPointerMarker*>(marker);
|
||||||
SetLowColor(96, 216, 216, 255);
|
if (ipMarker != NULL) {
|
||||||
|
rgb_color ipColor = {96, 216, 216, 255 };
|
||||||
|
if (!ipMarker->IsCurrentIP())
|
||||||
|
ipColor = tint_color(ipColor, B_LIGHTEN_2_TINT);
|
||||||
|
|
||||||
|
SetLowColor(ipColor);
|
||||||
|
|
||||||
|
}
|
||||||
else
|
else
|
||||||
SetLowColor(255, 255, 0, 255);
|
SetLowColor(255, 255, 0, 255);
|
||||||
FillRect(BRect(kLeftTextMargin, y, Bounds().right,
|
FillRect(BRect(kLeftTextMargin, y, Bounds().right,
|
||||||
|
|||||||
Reference in New Issue
Block a user