From e8aae26aea0727606f3cf182697f5914911821b4 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Wed, 12 Apr 2017 01:29:25 +0300 Subject: [PATCH] Small stylistic changes --- src/ChatPage.cc | 8 +++----- src/RoomInfoListItem.cc | 3 +-- src/TopRoomBar.cc | 10 +++++----- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/src/ChatPage.cc b/src/ChatPage.cc index db755f4f..db911972 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -212,12 +212,10 @@ void ChatPage::changeTopRoomInfo(const RoomInfo &info) top_bar_->updateRoomName(info.name()); top_bar_->updateRoomTopic(info.topic()); - if (room_avatars_.contains(info.id())) { - QIcon icon(room_avatars_.value(info.id())); - top_bar_->updateRoomAvatar(icon); - } else { + if (room_avatars_.contains(info.id())) + top_bar_->updateRoomAvatar(room_avatars_.value(info.id()).toImage()); + else top_bar_->updateRoomAvatarFromName(info.name()); - } current_room_ = info; } diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc index f803ce2e..12179567 100644 --- a/src/RoomInfoListItem.cc +++ b/src/RoomInfoListItem.cc @@ -29,8 +29,7 @@ RoomInfoListItem::RoomInfoListItem(RoomInfo info, QWidget *parent) , max_height_(60) { normal_style_ = - "QWidget { background-color: #5d6565; color: #ebebeb;" - "border-bottom: 1px solid #171919;}" + "QWidget { color: #ebebeb; background-color: #232626; border-bottom: 1px solid #171919;}" "QLabel { border: none; }"; pressed_style_ = diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index adff71b0..9e30c499 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -23,8 +23,8 @@ TopRoomBar::TopRoomBar(QWidget *parent) : QWidget(parent) { setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); - setMinimumSize(QSize(0, 70)); - setStyleSheet("background-color: #171919; color: #ebebeb;"); + setMinimumSize(QSize(0, 65)); + setStyleSheet("background-color: #232626; color: #ebebeb;"); top_layout_ = new QHBoxLayout(); top_layout_->setSpacing(10); @@ -33,17 +33,17 @@ TopRoomBar::TopRoomBar(QWidget *parent) avatar_ = new Avatar(this); avatar_->setLetter(QChar('?')); avatar_->setBackgroundColor(QColor("#ebebeb")); - avatar_->setSize(45); + avatar_->setSize(35); text_layout_ = new QVBoxLayout(); text_layout_->setSpacing(0); text_layout_->setContentsMargins(0, 0, 0, 0); name_label_ = new QLabel(this); - name_label_->setStyleSheet("font-size: 11pt;"); + name_label_->setStyleSheet("font-size: 14px; font-weight: 600;"); topic_label_ = new QLabel(this); - topic_label_->setStyleSheet("font-size: 10pt; color: #6c7278;"); + topic_label_->setStyleSheet("font-size: 12px;"); text_layout_->addWidget(name_label_); text_layout_->addWidget(topic_label_);