diff --git a/include/RegisterPage.h b/include/RegisterPage.h index 3e35959f..578ff902 100644 --- a/include/RegisterPage.h +++ b/include/RegisterPage.h @@ -24,6 +24,7 @@ #include #include +#include "Avatar.h" #include "FlatButton.h" #include "InputValidator.h" #include "MatrixClient.h" @@ -55,7 +56,7 @@ private: QHBoxLayout *logo_layout_; QHBoxLayout *button_layout_; - QLabel *logo_; + Avatar *logo_; QLabel *error_label_; FlatButton *back_button_; diff --git a/resources/nheko-128.png b/resources/nheko-128.png new file mode 100644 index 00000000..e65084ef Binary files /dev/null and b/resources/nheko-128.png differ diff --git a/resources/nheko-16.png b/resources/nheko-16.png new file mode 100644 index 00000000..deb4449d Binary files /dev/null and b/resources/nheko-16.png differ diff --git a/resources/nheko-256.png b/resources/nheko-256.png new file mode 100644 index 00000000..4f89112f Binary files /dev/null and b/resources/nheko-256.png differ diff --git a/resources/nheko-32.png b/resources/nheko-32.png new file mode 100644 index 00000000..ec582489 Binary files /dev/null and b/resources/nheko-32.png differ diff --git a/resources/nheko-512.png b/resources/nheko-512.png new file mode 100644 index 00000000..3c39b0be Binary files /dev/null and b/resources/nheko-512.png differ diff --git a/resources/nheko-64.png b/resources/nheko-64.png new file mode 100644 index 00000000..768921c9 Binary files /dev/null and b/resources/nheko-64.png differ diff --git a/resources/nheko.png b/resources/nheko.png new file mode 100644 index 00000000..3c39b0be Binary files /dev/null and b/resources/nheko.png differ diff --git a/resources/res.qrc b/resources/res.qrc index b90e4fe8..73700ee8 100644 --- a/resources/res.qrc +++ b/resources/res.qrc @@ -13,6 +13,16 @@ icons/power-button-off.png + + nheko.png + nheko-512.png + nheko-256.png + nheko-128.png + nheko-64.png + nheko-32.png + nheko-16.png + + fonts/OpenSans/OpenSans-Light.ttf fonts/OpenSans/OpenSans-LightItalic.ttf diff --git a/src/LoginPage.cc b/src/LoginPage.cc index f12bb8f8..2c0ffb09 100644 --- a/src/LoginPage.cc +++ b/src/LoginPage.cc @@ -44,11 +44,11 @@ LoginPage::LoginPage(QSharedPointer client, QWidget *parent) back_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter); back_layout_->addStretch(1); - logo_layout_ = new QHBoxLayout(); - logo_layout_->setContentsMargins(0, 20, 0, 20); logo_ = new QLabel(this); - logo_->setText("nheko"); - logo_->setStyleSheet("font-size: 22pt; font-weight: 400;"); + logo_->setPixmap(QPixmap(":/logos/nheko-128.png")); + + logo_layout_ = new QHBoxLayout(); + logo_layout_->setContentsMargins(0, 0, 0, 20); logo_layout_->addWidget(logo_, 0, Qt::AlignHCenter); form_wrapper_ = new QHBoxLayout(); @@ -84,7 +84,7 @@ LoginPage::LoginPage(QSharedPointer client, QWidget *parent) button_layout_->setContentsMargins(0, 0, 0, 50); login_button_ = new RaisedButton("LOGIN", this); - login_button_->setBackgroundColor(QColor("#171919")); + login_button_->setBackgroundColor(QColor("#333333")); login_button_->setForegroundColor(QColor("white")); login_button_->setMinimumSize(350, 65); login_button_->setCursor(QCursor(Qt::PointingHandCursor)); diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc index 2b2fae8b..4364c58b 100644 --- a/src/RegisterPage.cc +++ b/src/RegisterPage.cc @@ -44,11 +44,12 @@ RegisterPage::RegisterPage(QSharedPointer client, QWidget *parent) back_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter); back_layout_->addStretch(1); + logo_ = new Avatar(this); + logo_->setImage(QImage(":/logos/nheko-128.png")); + logo_->setSize(80); + logo_layout_ = new QHBoxLayout(); - logo_layout_->setContentsMargins(0, 20, 0, 20); - logo_ = new QLabel(this); - logo_->setText("nheko"); - logo_->setStyleSheet("font-size: 22pt; font-weight: 400;"); + logo_layout_->setMargin(0); logo_layout_->addWidget(logo_, 0, Qt::AlignHCenter); form_wrapper_ = new QHBoxLayout(); @@ -93,13 +94,13 @@ RegisterPage::RegisterPage(QSharedPointer client, QWidget *parent) button_layout_ = new QHBoxLayout(); button_layout_->setSpacing(0); - button_layout_->setContentsMargins(0, 0, 0, 30); + button_layout_->setMargin(0); error_label_ = new QLabel(this); - error_label_->setStyleSheet("margin-bottom: 20px; color: #E22826; font-size: 11pt;"); + error_label_->setStyleSheet("margin-bottom: 10px; color: #E22826; font-size: 11pt;"); register_button_ = new RaisedButton("REGISTER", this); - register_button_->setBackgroundColor(QColor("#171919")); + register_button_->setBackgroundColor(QColor("#333333")); register_button_->setForegroundColor(QColor("white")); register_button_->setMinimumSize(350, 65); register_button_->setCursor(QCursor(Qt::PointingHandCursor)); @@ -111,7 +112,6 @@ RegisterPage::RegisterPage(QSharedPointer client, QWidget *parent) button_layout_->addStretch(1); top_layout_->addLayout(back_layout_); - top_layout_->addStretch(1); top_layout_->addLayout(logo_layout_); top_layout_->addLayout(form_wrapper_); top_layout_->addStretch(1); diff --git a/src/WelcomePage.cc b/src/WelcomePage.cc index 37efbd14..d6668e7b 100644 --- a/src/WelcomePage.cc +++ b/src/WelcomePage.cc @@ -30,7 +30,7 @@ WelcomePage::WelcomePage(QWidget *parent) top_layout_->setMargin(0); intro_banner_ = new QLabel(this); - intro_banner_->setStyleSheet("background-color: #d6dde3;"); + intro_banner_->setPixmap(QPixmap(":/logos/nheko-256.png")); intro_banner_->setAlignment(Qt::AlignCenter); intro_text_ = new QLabel(this); @@ -38,28 +38,30 @@ WelcomePage::WelcomePage(QWidget *parent) "" "" "" - "

nheko

" "

" - " " - " A desktop client for Matrix, the open protocol for decentralized communication." + " " + " Welcome to nheko! The desktop client for the Matrix protocol." " " "

\n" "

" - " Enjoy your stay!" + " Enjoy your stay!" "

" "" "", Q_NULLPTR)); + top_layout_->addStretch(1); top_layout_->addWidget(intro_banner_); + top_layout_->addStretch(1); top_layout_->addWidget(intro_text_, 0, Qt::AlignCenter); + top_layout_->addStretch(1); button_layout_ = new QHBoxLayout(); button_layout_->setSpacing(0); button_layout_->setContentsMargins(0, 20, 0, 80); register_button_ = new RaisedButton("REGISTER", this); - register_button_->setBackgroundColor(QColor("#555459")); + register_button_->setBackgroundColor(QColor("#333333")); register_button_->setForegroundColor(QColor("white")); register_button_->setMinimumSize(240, 60); register_button_->setCursor(QCursor(Qt::PointingHandCursor)); @@ -67,7 +69,7 @@ WelcomePage::WelcomePage(QWidget *parent) register_button_->setCornerRadius(3); login_button_ = new RaisedButton("LOGIN", this); - login_button_->setBackgroundColor(QColor("#555459")); + login_button_->setBackgroundColor(QColor("#333333")); login_button_->setForegroundColor(QColor("white")); login_button_->setMinimumSize(240, 60); login_button_->setCursor(QCursor(Qt::PointingHandCursor)); diff --git a/src/main.cc b/src/main.cc index 0a9259c7..e2572901 100644 --- a/src/main.cc +++ b/src/main.cc @@ -39,6 +39,7 @@ int main(int argc, char *argv[]) QFontDatabase::addApplicationFont(":/fonts/emojione-android.ttf"); QApplication app(argc, argv); + app.setWindowIcon(QIcon(":/logos/nheko.png")); QFont font("Open Sans"); app.setFont(font);