More stylistic changes & dark theme tweaks

This commit is contained in:
Konstantinos Sideris 2018-03-19 20:26:14 +02:00
parent cef385e1e4
commit d2d65b6662
5 changed files with 32 additions and 16 deletions

View File

@ -51,6 +51,9 @@ class RoomInfoListItem : public QWidget
Q_PROPERTY(QColor avatarBgColor READ avatarBgColor WRITE setAvatarBgColor)
Q_PROPERTY(QColor avatarFgColor READ avatarFgColor WRITE setAvatarFgColor)
Q_PROPERTY(QColor bubbleBgColor READ bubbleBgColor WRITE setBubbleBgColor)
Q_PROPERTY(QColor bubbleFgColor READ bubbleFgColor WRITE setBubbleFgColor)
Q_PROPERTY(QColor titleColor READ titleColor WRITE setTitleColor)
Q_PROPERTY(QColor subtitleColor READ subtitleColor WRITE setSubtitleColor)
@ -107,6 +110,9 @@ public:
QColor btnColor() const { return btnColor_; }
QColor btnTextColor() const { return btnTextColor_; }
QColor bubbleFgColor() const { return bubbleFgColor_; }
QColor bubbleBgColor() const { return bubbleBgColor_; }
void setHighlightedBackgroundColor(QColor &color) { highlightedBackgroundColor_ = color; }
void setHoverBackgroundColor(QColor &color) { hoverBackgroundColor_ = color; }
void setBackgroundColor(QColor &color) { backgroundColor_ = color; }
@ -124,6 +130,9 @@ public:
void setBtnColor(QColor &color) { btnColor_ = color; }
void setBtnTextColor(QColor &color) { btnTextColor_ = color; }
void setBubbleFgColor(QColor &color) { bubbleFgColor_ = color; }
void setBubbleBgColor(QColor &color) { bubbleBgColor_ = color; }
signals:
void clicked(const QString &room_id);
void leaveRoom(const QString &room_id);
@ -213,4 +222,7 @@ private:
QColor avatarBgColor_;
QColor avatarFgColor_;
QColor bubbleBgColor_;
QColor bubbleFgColor_;
};

View File

@ -29,19 +29,19 @@ CommunitiesList > * {
}
FlatButton {
qproperty-foregroundColor: #caccd1;
qproperty-foregroundColor: #727274;
qproperty-backgroundColor: #333;
}
FileItem {
qproperty-textColor: #caccd1;
qproperty-backgroundColor: #414A59;
qproperty-backgroundColor: #2d3139;
qproperty-iconColor: #caccd1;
}
AudioItem {
qproperty-textColor: #caccd1;
qproperty-backgroundColor: #414A59;
qproperty-backgroundColor: #2d3139;
qproperty-iconColor: #caccd1;
}
@ -69,6 +69,9 @@ RoomInfoListItem {
qproperty-avatarBgColor: #202228;
qproperty-avatarFgColor: white;
qproperty-bubbleFgColor: white;
qproperty-bubbleBgColor: #4d84c7;
}
CommunitiesListItem {
@ -144,8 +147,8 @@ emoji--Category > * {
}
FloatingButton {
qproperty-backgroundColor: #efefef;
qproperty-foregroundColor: black;
qproperty-backgroundColor: #2d3139;
qproperty-foregroundColor: white;
}
TextField {
@ -155,7 +158,7 @@ TextField {
}
ScrollBar {
qproperty-handleColor: #caccd1;
qproperty-handleColor: #2d3139;
qproperty-backgroundColor: #202228;
}

View File

@ -29,7 +29,7 @@ CommunitiesList > * {
}
FlatButton {
qproperty-foregroundColor: #333;
qproperty-foregroundColor: #8c8c8c;
}
FileItem {

View File

@ -280,15 +280,12 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
}
if (unreadMsgCount_ > 0) {
QColor textColor("white");
QColor backgroundColor("#38A3D8");
QBrush brush;
brush.setStyle(Qt::SolidPattern);
brush.setColor(backgroundColor);
brush.setColor(bubbleBgColor());
if (isPressed_)
brush.setColor(textColor);
brush.setColor(bubbleFgColor());
p.setBrush(brush);
p.setPen(Qt::NoPen);
@ -306,10 +303,10 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
p.setPen(Qt::NoPen);
p.drawEllipse(r);
p.setPen(QPen(textColor));
p.setPen(QPen(bubbleFgColor()));
if (isPressed_)
p.setPen(QPen(backgroundColor));
p.setPen(QPen(bubbleBgColor()));
p.setBrush(Qt::NoBrush);
p.drawText(

View File

@ -31,6 +31,10 @@
constexpr const static char *CHECKMARK = "";
constexpr int MSG_RIGHT_MARGIN = 7;
constexpr int MSG_BOTTOM_MARGIN = 4;
constexpr int MSG_PADDING = 20;
void
TimelineItem::init()
{
@ -68,8 +72,8 @@ TimelineItem::init()
topLayout_ = new QHBoxLayout(this);
mainLayout_ = new QVBoxLayout;
messageLayout_ = new QHBoxLayout;
messageLayout_->setContentsMargins(0, 0, 20, 4);
messageLayout_->setSpacing(20);
messageLayout_->setContentsMargins(0, 0, MSG_RIGHT_MARGIN, MSG_BOTTOM_MARGIN);
messageLayout_->setSpacing(MSG_PADDING);
topLayout_->setContentsMargins(conf::timeline::msgMargin, conf::timeline::msgMargin, 0, 0);
topLayout_->setSpacing(0);