diff --git a/src/timeline/TimelineItem.cc b/src/timeline/TimelineItem.cc index 063f1a41..62e195a4 100644 --- a/src/timeline/TimelineItem.cc +++ b/src/timeline/TimelineItem.cc @@ -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)); } /*