summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorChris Tarazi <tarazichris@gmail.com>2018-02-06 20:52:21 -0800
committerChris Tarazi <tarazichris@gmail.com>2018-02-07 21:32:22 -0800
commit31eb0a9c88268322c51f2567d23cedd85673fb35 (patch)
tree67225d08bd58cae08557bbabb6bb35f1e2c69dc5 /src
parentApply fixed width for checkmark for all messages (diff)
downloadnheko-31eb0a9c88268322c51f2567d23cedd85673fb35.tar.xz
Create new font for checkmark
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineItem.cc9
1 files changed, 5 insertions, 4 deletions
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)); } /*