1
0
Fork 0

GUI: Highlighting the current thread in call stack view

This commit is contained in:
morsisko 2020-12-03 14:23:36 +01:00
parent 57eeb091be
commit ffba0d5111
1 changed files with 12 additions and 2 deletions

View File

@ -66,18 +66,28 @@ void CallStackView::setupContextMenu()
QString CallStackView::paintContent(QPainter* painter, dsint rowBase, int rowOffset, int col, int x, int y, int w, int h)
{
QString ret = getCellContent(rowBase + rowOffset, col);
if(isSelected(rowBase, rowOffset))
painter->fillRect(QRect(x, y, w, h), QBrush(mSelectionColor));
bool isSpaceRow = !getCellContent(rowBase + rowOffset, ColThread).isEmpty();
if(col > ColThread && isSpaceRow)
if(!col && !(rowBase + rowOffset) && !ret.isEmpty())
{
painter->fillRect(QRect(x, y, w, h), QBrush(ConfigColor("ThreadCurrentBackgroundColor")));
painter->setPen(QPen(ConfigColor("ThreadCurrentColor")));
painter->drawText(QRect(x + 4, y, w - 4, h), Qt::AlignVCenter | Qt::AlignLeft, ret);
ret = "";
}
else if(col > ColThread && isSpaceRow)
{
auto mid = h / 2.0;
painter->drawLine(QPointF(x, y + mid), QPointF(x + w, y + mid));
}
return getCellContent(rowBase + rowOffset, col);
return ret;
}
void CallStackView::updateCallStack()