From 2644e4accaf7487ad51b205040163e42b76de3a4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Sun, 20 Aug 2017 13:47:22 +0300 Subject: Small style change --- src/TopRoomBar.cc | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/TopRoomBar.cc') diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index 9de19e86..dd1cabf3 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -21,8 +21,8 @@ #include "TopRoomBar.h" TopRoomBar::TopRoomBar(QWidget *parent) - : QWidget(parent) - , buttonSize_{32} + : QWidget(parent) + , buttonSize_{ 32 } { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setMinimumSize(QSize(0, 65)); @@ -75,9 +75,7 @@ TopRoomBar::TopRoomBar(QWidget *parent) menu_ = new Menu(this); toggleNotifications_ = new QAction(tr("Disable notifications"), this); - connect(toggleNotifications_, &QAction::triggered, this, [=]() { - roomSettings_->toggleNotifications(); - }); + connect(toggleNotifications_, &QAction::triggered, this, [=]() { roomSettings_->toggleNotifications(); }); menu_->addAction(toggleNotifications_); @@ -88,14 +86,14 @@ TopRoomBar::TopRoomBar(QWidget *parent) toggleNotifications_->setText(tr("Enable notifications")); auto pos = mapToGlobal(settingsBtn_->pos()); - menu_->popup(QPoint(pos.x() + buttonSize_ - menu_->sizeHint().width(), - pos.y() + buttonSize_)); + menu_->popup(QPoint(pos.x() + buttonSize_ - menu_->sizeHint().width(), pos.y() + buttonSize_)); }); setLayout(top_layout_); } -void TopRoomBar::updateRoomAvatarFromName(const QString &name) +void +TopRoomBar::updateRoomAvatarFromName(const QString &name) { QChar letter = '?'; @@ -105,14 +103,16 @@ void TopRoomBar::updateRoomAvatarFromName(const QString &name) avatar_->setLetter(letter); } -void TopRoomBar::reset() +void +TopRoomBar::reset() { name_label_->setText(""); topic_label_->setText(""); avatar_->setLetter(QChar('?')); } -void TopRoomBar::paintEvent(QPaintEvent *event) +void +TopRoomBar::paintEvent(QPaintEvent *event) { Q_UNUSED(event); @@ -123,7 +123,8 @@ void TopRoomBar::paintEvent(QPaintEvent *event) style()->drawPrimitive(QStyle::PE_Widget, &option, &painter, this); } -void TopRoomBar::setRoomSettings(QSharedPointer settings) +void +TopRoomBar::setRoomSettings(QSharedPointer settings) { roomSettings_ = settings; } -- cgit 1.4.1