Skip to content

Commit

Permalink
Implement underline attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
falbru committed May 21, 2024
1 parent c1f16ee commit e02b4ab
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/rpc/atom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,12 @@ void Atom::draw(const DrawContext &context, const QPoint &position, const Face &
context.painter.drawText(QRect(position.x() + i * context.cell_size.width(), position.y(), width, height),
Qt::AlignTop, m_contents.at(i));
}

if (default_face.hasAttribute(Attribute::underline) || m_face.hasAttribute(Attribute::underline))
{
context.painter.drawLine(position.x(), position.y() + context.cell_size.height() - 1,
position.x() + context.cell_size.width() * m_contents.size(),
position.y() + context.cell_size.height() - 1);
}
}
} // namespace RPC

0 comments on commit e02b4ab

Please sign in to comment.