Create new font for checkmark

This commit is contained in:
Chris Tarazi 2018-02-06 20:52:21 -08:00
parent 2dcc01633e
commit 31eb0a9c88
No known key found for this signature in database
GPG Key ID: 746C4A065572CA6B
1 changed files with 5 additions and 4 deletions

View File

@ -64,13 +64,14 @@ TimelineItem::init()
mainLayout_->setContentsMargins(conf::timeline::headerLeftMargin, 0, 0, 0);
mainLayout_->setSpacing(0);
QFont checkmarkFont;
checkmarkFont.setPixelSize(conf::timeline::fonts::timestamp);
// Setting fixed width for checkmark because systems may have a differing width for a
// space and the Unicode checkmark.
checkmark_ = new QLabel(" ", this);
checkmark_->setFixedWidth(fm.width(CHECKMARK));
checkmark_->setFont(font_);
checkmark_->setStyleSheet(
QString("font-size: %1px;").arg(conf::timeline::fonts::timestamp));
checkmark_->setFont(checkmarkFont);
checkmark_->setFixedWidth(QFontMetrics{checkmarkFont}.width(CHECKMARK));
}
/*