summary refs log tree commit diff
path: root/src/TypingDisplay.cc
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-04 22:00:26 +0300
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2017-10-04 22:00:26 +0300
commit28b3a3fde02e5fc422bfc44cfbedb940815b823b (patch)
tree75fcd0e5d58b2ec573c55b73fbf0b388157333a3 /src/TypingDisplay.cc
parentReceive typing notifications (#88) (diff)
downloadnheko-28b3a3fde02e5fc422bfc44cfbedb940815b823b.tar.xz
Put typing notifications above the text input
Diffstat (limited to 'src/TypingDisplay.cc')
-rw-r--r--src/TypingDisplay.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/TypingDisplay.cc b/src/TypingDisplay.cc

index 619b70cb..7792d3e4 100644 --- a/src/TypingDisplay.cc +++ b/src/TypingDisplay.cc
@@ -7,7 +7,7 @@ TypingDisplay::TypingDisplay(QWidget *parent) : QWidget(parent) - , leftPadding_{ 57 } + , leftPadding_{ 24 } { QFont font; font.setPixelSize(conf::typingNotificationFontSize); @@ -24,9 +24,9 @@ TypingDisplay::setUsers(const QStringList &uid) text_ = uid.join(", "); if (uid.size() == 1) - text_ += tr(" is typing ..."); + text_ += tr(" is typing"); else if (uid.size() > 1) - text_ += tr(" are typing ..."); + text_ += tr(" are typing"); update(); } @@ -34,11 +34,10 @@ TypingDisplay::setUsers(const QStringList &uid) void TypingDisplay::paintEvent(QPaintEvent *) { - QPen pen(QColor("#333")); + QPen pen(QColor("#898989")); - QFont font; + QFont font("Open Sans Bold"); font.setPixelSize(conf::typingNotificationFontSize); - font.setWeight(40); font.setItalic(true); QPainter p(this); @@ -52,5 +51,5 @@ TypingDisplay::paintEvent(QPaintEvent *) QFontMetrics fm(font); text_ = fm.elidedText(text_, Qt::ElideRight, width() - 3 * leftPadding_); - p.drawText(region, Qt::AlignTop, text_); + p.drawText(region, Qt::AlignVCenter, text_); }