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

View file

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

View file

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

View file

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

View file

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