3 files changed, 27 insertions, 15 deletions
diff --git a/src/TextInputWidget.cc b/src/TextInputWidget.cc
index 82cc8b4e..f09608a0 100644
--- a/src/TextInputWidget.cc
+++ b/src/TextInputWidget.cc
@@ -57,10 +57,14 @@ TextInputWidget::TextInputWidget(QWidget *parent)
send_file_button_->setIcon(send_file_icon);
send_file_button_->setIconSize(QSize(24, 24));
+ QFont font;
+ font.setPointSize(this->font().pointSize() * TextFontRatio);
+
input_ = new FilteredTextEdit(this);
input_->setFixedHeight(45);
+ input_->setFont(font);
input_->setPlaceholderText(tr("Write a message..."));
- input_->setStyleSheet("color: #333333; font-size: 13px; border-radius: 0; padding-top: 10px;");
+ input_->setStyleSheet("color: #333333; border-radius: 0; padding-top: 10px;");
send_message_button_ = new FlatButton(this);
send_message_button_->setForegroundColor(QColor("#acc7dc"));
@@ -95,10 +99,10 @@ void TextInputWidget::addSelectedEmoji(const QString &emoji)
QTextCursor cursor = input_->textCursor();
QFont emoji_font("Emoji One");
- emoji_font.setPixelSize(18);
+ emoji_font.setPointSize(this->font().pointSize() * EmojiFontRatio);
QFont text_font("Open Sans");
- text_font.setPixelSize(13);
+ text_font.setPixelSize(this->font().pointSize() * TextFontRatio);
QTextCharFormat charfmt;
charfmt.setFont(emoji_font);
diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc
index 4b4c8aa5..74e255a0 100644
--- a/src/TopRoomBar.cc
+++ b/src/TopRoomBar.cc
@@ -41,11 +41,18 @@ TopRoomBar::TopRoomBar(QWidget *parent)
text_layout_->setSpacing(0);
text_layout_->setContentsMargins(0, 0, 0, 0);
+ QFont font;
+ font.setPointSize(this->font().pointSize() * RoomNameFontRatio);
+ font.setBold(true);
+
name_label_ = new QLabel(this);
- name_label_->setStyleSheet("font-size: 14px; font-weight: 600;");
+ name_label_->setFont(font);
+
+ font.setBold(false);
+ font.setPointSize(this->font().pointSize() * RoomDescriptionFontRatio);
topic_label_ = new QLabel(this);
- topic_label_->setStyleSheet("font-size: 12px;");
+ topic_label_->setFont(font);
text_layout_->addWidget(name_label_);
text_layout_->addWidget(topic_label_);
diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc
index 361689ef..a8fddcd0 100644
--- a/src/UserInfoWidget.cc
+++ b/src/UserInfoWidget.cc
@@ -47,20 +47,21 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
userAvatar_->setBackgroundColor("#f9f9f9");
userAvatar_->setTextColor("#333333");
+ QFont font;
+ font.setBold(true);
+ font.setPointSize(this->font().pointSize() * DisplayNameFontRatio);
+
displayNameLabel_ = new QLabel(this);
- displayNameLabel_->setStyleSheet(
- "padding: 0 9px;"
- "color: #171919;"
- "font-size: 14px;"
- "font-weight: 500;"
- "margin-bottom: -10px;");
+ displayNameLabel_->setFont(font);
+ displayNameLabel_->setStyleSheet("padding: 0 9px; color: #171919; margin-bottom: -10px;");
displayNameLabel_->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop);
+ font.setBold(false);
+ font.setPointSize(this->font().pointSize() * UserIdFontRatio);
+
userIdLabel_ = new QLabel(this);
- userIdLabel_->setStyleSheet(
- "padding: 0 8px 8px 8px;"
- "color: #555459;"
- "font-size: 13px");
+ userIdLabel_->setFont(font);
+ userIdLabel_->setStyleSheet("padding: 0 8px 8px 8px; color: #555459;");
userIdLabel_->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter);
avatarLayout_->addWidget(userAvatar_);
|