mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Don't set the font size with a stylesheet
This commit is contained in:
parent
e3acb533ad
commit
3d77438878
1 changed files with 7 additions and 6 deletions
|
@ -77,13 +77,14 @@ RoomInfoListItem::RoomInfoListItem(RoomInfo info, QWidget *parent)
|
|||
avatarLayout_->addWidget(roomAvatar_);
|
||||
|
||||
roomName_ = new QLabel(info_.name(), textWidget_);
|
||||
roomName_->setMaximumSize(parent->width() - 10, 20);
|
||||
roomName_->setStyleSheet("font-weight: 400; font-size: 14px;");
|
||||
roomName_->setMaximumSize(parent->width() - max_height_, 20);
|
||||
roomName_->setFont(QFont("Open Sans", 11));
|
||||
roomName_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
roomTopic_ = new QLabel(info_.topic(), textWidget_);
|
||||
roomTopic_->setMaximumSize(parent->width() - 10, 20);
|
||||
roomTopic_->setStyleSheet("color: #171919; font-size: 12px");
|
||||
roomTopic_->setMaximumSize(parent->width() - max_height_, 20);
|
||||
roomTopic_->setFont(QFont("Open Sans", 10));
|
||||
roomTopic_->setStyleSheet("color: #171919");
|
||||
roomTopic_->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
|
||||
|
||||
textLayout_->addWidget(roomName_);
|
||||
|
@ -92,8 +93,8 @@ RoomInfoListItem::RoomInfoListItem(RoomInfo info, QWidget *parent)
|
|||
topLayout_->addWidget(avatarWidget_);
|
||||
topLayout_->addWidget(textWidget_);
|
||||
|
||||
setElidedText(roomName_, info_.name(), parent->width() - 10);
|
||||
setElidedText(roomTopic_, info_.topic(), parent->width() - 10);
|
||||
setElidedText(roomName_, info_.name(), parent->width() - max_height_);
|
||||
setElidedText(roomTopic_, info_.topic(), parent->width() - max_height_);
|
||||
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(rect(), 0, 0);
|
||||
|
|
Loading…
Reference in a new issue