Add logo icons

This commit is contained in:
Konstantinos Sideris 2017-04-21 17:16:29 +03:00
parent f046dc8ac6
commit fa83ae1cf8
13 changed files with 35 additions and 21 deletions

View file

@ -24,6 +24,7 @@
#include <QVBoxLayout>
#include <QWidget>
#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_;

BIN
resources/nheko-128.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

BIN
resources/nheko-16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 728 B

BIN
resources/nheko-256.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

BIN
resources/nheko-32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
resources/nheko-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
resources/nheko-64.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

BIN
resources/nheko.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View file

@ -13,6 +13,16 @@
<file>icons/power-button-off.png</file>
</qresource>
<qresource prefix="/logos">
<file>nheko.png</file>
<file>nheko-512.png</file>
<file>nheko-256.png</file>
<file>nheko-128.png</file>
<file>nheko-64.png</file>
<file>nheko-32.png</file>
<file>nheko-16.png</file>
</qresource>
<qresource prefix="/fonts">
<file>fonts/OpenSans/OpenSans-Light.ttf</file>
<file>fonts/OpenSans/OpenSans-LightItalic.ttf</file>

View file

@ -44,11 +44,11 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> 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<MatrixClient> 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));

View file

@ -44,11 +44,12 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> 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<MatrixClient> 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<MatrixClient> 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);

View file

@ -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)
"<html>"
"<head/>"
"<body>"
" <p align=\"center\"><span style=\" font-size:28pt;\"> nheko </span></p>"
" <p align=\"center\" style=\"margin: 0; line-height: 2pt\">"
" <span style=\" font-size:12pt; color:#6d7387;\"> "
" A desktop client for Matrix, the open protocol for decentralized communication."
" <span style=\" font-size:18px; color:#515151;\"> "
" Welcome to nheko! The desktop client for the Matrix protocol."
" </span>"
" </p>\n"
" <p align=\"center\" style=\"margin: 1pt; line-height: 2pt;\">"
" <span style=\" font-size:12pt; color:#6d7387;\">Enjoy your stay!</span>"
" <span style=\" font-size:18px; color:#515151;\">Enjoy your stay!</span>"
" </p>"
"</body>"
"</html>",
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));

View file

@ -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);