diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-25 15:14:37 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-25 15:14:37 +0200 |
commit | f36e498503860a5c3051ef202c60b61876150c61 (patch) | |
tree | 79477587e672fd657ba9ebd1bb322edda72618e7 | |
parent | Use span tags to prevent html escaping (diff) | |
download | nheko-f36e498503860a5c3051ef202c60b61876150c61.tar.xz |
Update system theme
-rw-r--r-- | include/RegisterPage.h | 3 | ||||
-rw-r--r-- | include/ui/TextField.h | 1 | ||||
-rw-r--r-- | resources/styles/system.qss | 43 | ||||
-rw-r--r-- | src/RegisterPage.cc | 6 | ||||
-rw-r--r-- | src/WelcomePage.cc | 4 | ||||
-rw-r--r-- | src/ui/TextField.cc | 8 |
6 files changed, 46 insertions, 19 deletions
diff --git a/include/RegisterPage.h b/include/RegisterPage.h index 26d9f2c0..2d1d954b 100644 --- a/include/RegisterPage.h +++ b/include/RegisterPage.h @@ -21,7 +21,6 @@ #include <QLayout> #include <QSharedPointer> -class Avatar; class FlatButton; class MatrixClient; class RaisedButton; @@ -55,7 +54,7 @@ private: QHBoxLayout *logo_layout_; QHBoxLayout *button_layout_; - Avatar *logo_; + QLabel *logo_; QLabel *error_label_; FlatButton *back_button_; diff --git a/include/ui/TextField.h b/include/ui/TextField.h index c215a1f8..f66a7451 100644 --- a/include/ui/TextField.h +++ b/include/ui/TextField.h @@ -18,6 +18,7 @@ class TextField : public QLineEdit Q_PROPERTY(QColor textColor WRITE setTextColor READ textColor) Q_PROPERTY(QColor inkColor WRITE setInkColor READ inkColor) Q_PROPERTY(QColor underlineColor WRITE setUnderlineColor READ underlineColor) + Q_PROPERTY(QColor backgroundColor WRITE setBackgroundColor READ backgroundColor) public: explicit TextField(QWidget *parent = 0); diff --git a/resources/styles/system.qss b/resources/styles/system.qss index c81b8652..0683a48d 100644 --- a/resources/styles/system.qss +++ b/resources/styles/system.qss @@ -5,41 +5,70 @@ OverlayWidget > * { #mainContent, #mainContent > * { - background-color: palette(base); + background-color: palette(window); } TimelineView, TimelineView > *, TimelineItem, TimelineItem > * { - background-color: palette(base); + background-color: palette(window); } FlatButton { qproperty-foregroundColor: palette(text); } +RaisedButton { + qproperty-foregroundColor: palette(light); +} + +TextField { + qproperty-backgroundColor: palette(window); +} + +WelcomePage, +LoginPage, +RegisterPage { + background-color: palette(window); +} + RoomInfoListItem { qproperty-highlightedBackgroundColor: palette(highlight); - qproperty-hoverBackgroundColor: palette(dark); + qproperty-hoverBackgroundColor: palette(mid); qproperty-backgroundColor: palette(window); qproperty-titleColor: palette(text); qproperty-subtitleColor: palette(text); - qproperty-highlightedTitleColor: palette(text); - qproperty-highlightedSubtitleColor: palette(text); + qproperty-highlightedTitleColor: palette(light); + qproperty-highlightedSubtitleColor: palette(light); } LoadingIndicator { - qproperty-color: palette(text); + qproperty-color: palette(highlight); } #ChatPageLoadSpinner { - qproperty-color: #acc7dc; + qproperty-color: palette(light); } UserInfoWidget, UserInfoWidget > * { background-color: palette(window); } + +EmojiCategory, +EmojiCategory > * { + background-color: palette(window); +} + +EmojiPanel, +EmojiPanel > * { + background-color: palette(window); +} + +QTextEdit, +QLineEdit { + background-color: palette(window); +} diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc index c03fae4c..28d0a8a4 100644 --- a/src/RegisterPage.cc +++ b/src/RegisterPage.cc @@ -17,7 +17,6 @@ #include <QStyleOption> -#include "Avatar.h" #include "Config.h" #include "FlatButton.h" #include "InputValidator.h" @@ -51,9 +50,8 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent) QIcon logo; logo.addFile(":/logos/register.png"); - logo_ = new Avatar(this); - logo_->setIcon(logo); - logo_->setSize(128); + logo_ = new QLabel(this); + logo_->setPixmap(logo.pixmap(128)); logo_layout_ = new QHBoxLayout(); logo_layout_->setMargin(0); diff --git a/src/WelcomePage.cc b/src/WelcomePage.cc index 30d8f692..b21da92a 100644 --- a/src/WelcomePage.cc +++ b/src/WelcomePage.cc @@ -31,8 +31,8 @@ WelcomePage::WelcomePage(QWidget *parent) auto topLayout_ = new QVBoxLayout(this); topLayout_->setSpacing(20); - QFont headingFont("Open Sans", 22); - QFont subTitleFont("Open Sans", 21); + QFont headingFont("Open Sans", 20); + QFont subTitleFont("Open Sans", 19); QIcon icon; icon.addFile(":/logos/splash.png"); diff --git a/src/ui/TextField.cc b/src/ui/TextField.cc index d80d6466..ff662a11 100644 --- a/src/ui/TextField.cc +++ b/src/ui/TextField.cc @@ -15,7 +15,7 @@ TextField::TextField(QWidget *parent) state_machine_ = new TextFieldStateMachine(this); label_ = 0; - label_font_size_ = 13; + label_font_size_ = 15; show_label_ = false; background_color_ = QColor("white"); @@ -25,7 +25,7 @@ TextField::TextField(QWidget *parent) setTextMargins(0, 4, 0, 6); QFont font("Open Sans"); - font.setPixelSize(12); + font.setPixelSize(14); setFont(font); state_machine_->start(); @@ -341,8 +341,8 @@ TextFieldLabel::TextFieldLabel(TextField *parent) scale_ = 1; color_ = parent->labelColor(); - QFontDatabase db; - QFont font(db.font("Open Sans", "Medium", parent->labelFontSize())); + QFont font("Open Sans SemiBold"); + font.setPixelSize(parent->labelFontSize()); font.setLetterSpacing(QFont::PercentageSpacing, 102); setFont(font); } |