mirror of
https://github.com/Murmele/Gittyup.git
synced 2024-09-11 02:35:41 +03:00
Render 'Uncommitted changes' in italics
This commit is contained in:
parent
1508333316
commit
22d81be025
@ -787,7 +787,16 @@ public:
|
||||
// Draw content.
|
||||
git::Commit commit =
|
||||
index.data(CommitList::Role::CommitRole).value<git::Commit>();
|
||||
if (commit.isValid()) {
|
||||
if (!commit.isValid()) {
|
||||
// special case for uncommitted changes
|
||||
QString message = index.model()->data(index).toString();
|
||||
painter->save();
|
||||
QFont italic = opt.font;
|
||||
italic.setItalic(true);
|
||||
painter->setFont(italic);
|
||||
painter->drawText(opt.rect, Qt::AlignCenter, message);
|
||||
painter->restore();
|
||||
} else {
|
||||
const QFontMetrics &fm = opt.fontMetrics;
|
||||
QRect star = rect;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user