Skip to content
Snippets Groups Projects
Unverified Commit 2dcc0163 authored by Chris Tarazi's avatar Chris Tarazi
Browse files

Apply fixed width for checkmark for all messages

parent a15079c6
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,7 @@ TimelineItem::setupLocalWidgetLayout(Widget *widget,
messageLayout_->addLayout(widgetLayout, 1);
}
messageLayout_->addWidget(checkmark_);
messageLayout_->addWidget(timestamp_);
mainLayout_->addLayout(messageLayout_);
}
......@@ -232,6 +233,7 @@ TimelineItem::setupWidgetLayout(Widget *widget,
messageLayout_->addLayout(widgetLayout, 1);
}
messageLayout_->addWidget(checkmark_);
messageLayout_->addWidget(timestamp_);
mainLayout_->addLayout(messageLayout_);
}
......@@ -30,6 +30,8 @@
#include "timeline/widgets/ImageItem.h"
#include "timeline/widgets/VideoItem.h"
constexpr const static char *CHECKMARK = "✓";
void
TimelineItem::init()
{
......@@ -62,7 +64,11 @@ TimelineItem::init()
mainLayout_->setContentsMargins(conf::timeline::headerLeftMargin, 0, 0, 0);
mainLayout_->setSpacing(0);
// 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));
}
......@@ -351,7 +357,7 @@ TimelineItem::TimelineItem(const mtx::events::RoomEvent<mtx::events::msg::Text>
void
TimelineItem::markReceived()
{
checkmark_->setText("✓");
checkmark_->setText(CHECKMARK);
checkmark_->setAlignment(Qt::AlignTop);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment