|
|
@ -30,6 +30,8 @@ |
|
|
|
#include "Theme.h" |
|
|
|
#include "Theme.h" |
|
|
|
#include "Utils.h" |
|
|
|
#include "Utils.h" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr int BubbleDiameter = 18; |
|
|
|
|
|
|
|
|
|
|
|
constexpr int Padding = 9; |
|
|
|
constexpr int Padding = 9; |
|
|
|
constexpr int IconSize = 44; |
|
|
|
constexpr int IconSize = 44; |
|
|
|
constexpr int MaxHeight = IconSize + 2 * Padding; |
|
|
|
constexpr int MaxHeight = IconSize + 2 * Padding; |
|
|
@ -68,7 +70,7 @@ RoomInfoListItem::init(QWidget *parent) |
|
|
|
timestampFont_.setBold(false); |
|
|
|
timestampFont_.setBold(false); |
|
|
|
|
|
|
|
|
|
|
|
headingFont_ = font_; |
|
|
|
headingFont_ = font_; |
|
|
|
headingFont_.setPixelSize(conf::roomlist::fonts::heading - 1); |
|
|
|
headingFont_.setPixelSize(conf::roomlist::fonts::heading); |
|
|
|
headingFont_.setWeight(60); |
|
|
|
headingFont_.setWeight(60); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -291,14 +293,16 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) |
|
|
|
p.setPen(Qt::NoPen); |
|
|
|
p.setPen(Qt::NoPen); |
|
|
|
p.setFont(unreadCountFont_); |
|
|
|
p.setFont(unreadCountFont_); |
|
|
|
|
|
|
|
|
|
|
|
int diameter = 20; |
|
|
|
QRectF r(width() - BubbleDiameter - Padding, |
|
|
|
|
|
|
|
bottom_y - BubbleDiameter / 2 - 5, |
|
|
|
QRectF r( |
|
|
|
BubbleDiameter, |
|
|
|
width() - diameter - Padding, bottom_y - diameter / 2 - 5, diameter, diameter); |
|
|
|
BubbleDiameter); |
|
|
|
|
|
|
|
|
|
|
|
if (width() == ui::sidebar::SmallSize) |
|
|
|
if (width() == ui::sidebar::SmallSize) |
|
|
|
r = QRectF( |
|
|
|
r = QRectF(width() - BubbleDiameter - 5, |
|
|
|
width() - diameter - 5, height() - diameter - 5, diameter, diameter); |
|
|
|
height() - BubbleDiameter - 5, |
|
|
|
|
|
|
|
BubbleDiameter, |
|
|
|
|
|
|
|
BubbleDiameter); |
|
|
|
|
|
|
|
|
|
|
|
p.setPen(Qt::NoPen); |
|
|
|
p.setPen(Qt::NoPen); |
|
|
|
p.drawEllipse(r); |
|
|
|
p.drawEllipse(r); |
|
|
|