Skip to content
Snippets Groups Projects
Commit 55294111 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Fix minor stylistic issues on the nheko theme

parent 929b2df6
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,9 @@ class LeaveRoomDialog : public QFrame
public:
explicit LeaveRoomDialog(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void closing(bool isLeaving);
......
......@@ -42,6 +42,9 @@ public:
signals:
void backButtonClicked();
protected:
void paintEvent(QPaintEvent *event) override;
public slots:
// Displays errors produced during the login.
void loginError(QString error_message);
......
......@@ -27,6 +27,9 @@ class LogoutDialog : public QFrame
public:
explicit LogoutDialog(QWidget *parent = nullptr);
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void closing(bool isLoggingOut);
......
......@@ -35,6 +35,9 @@ public:
RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
~RegisterPage();
protected:
void paintEvent(QPaintEvent *event) override;
signals:
void backButtonClicked();
......
......@@ -65,6 +65,7 @@ public:
protected:
void showEvent(QShowEvent *event) override;
void resizeEvent(QResizeEvent *event) override;
void paintEvent(QPaintEvent *event) override;
signals:
void moveBack();
......
......@@ -28,6 +28,9 @@ class WelcomePage : public QWidget
public:
explicit WelcomePage(QWidget *parent = 0);
protected:
void paintEvent(QPaintEvent *event) override;
signals:
// Notify that the user wants to login in.
void userLogin();
......
* {
color: #333;
}
QLabel {
color: #333;
}
......@@ -10,8 +6,6 @@ QLabel {
TimelineView, TimelineView > * { background-color: white; }
QMenu, QMenu > * { background-color: white; }
FlatButton { qproperty-foregroundColor: #333; }
RaisedButton { qproperty-foregroundColor: white; }
......@@ -42,6 +36,10 @@ UserInfoWidget, UserInfoWidget > * {
color: #ebebeb;
}
UserSettingsPage {
background-color: white;
}
Avatar {
qproperty-textColor: black;
qproperty-backgroundColor: #eee;
......@@ -54,3 +52,28 @@ Avatar {
#userIdLabel {
color: #555459;
}
LogoutDialog {
background-color: white;
color: #333;
}
LeaveRoomDialog {
background-color: white;
color: #333;
}
WelcomePage {
background-color: white;
color: #333;
}
LoginPage {
background-color: white;
color: #333;
}
RegisterPage {
background-color: white;
color: #333;
}
#include <QLabel>
#include <QVBoxLayout>
#include <QStyleOption>
#include "Config.h"
#include "FlatButton.h"
......@@ -43,3 +44,12 @@ LeaveRoomDialog::LeaveRoomDialog(QWidget *parent)
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
connect(cancelBtn_, &QPushButton::clicked, [=]() { emit closing(false); });
}
void
LeaveRoomDialog::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
......@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QStyleOption>
#include "LoginPage.h"
#include "Config.h"
#include "FlatButton.h"
......@@ -301,4 +303,13 @@ LoginPage::onBackButtonClicked()
emit backButtonClicked();
}
void
LoginPage::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
LoginPage::~LoginPage() {}
......@@ -17,6 +17,8 @@
#include <QLabel>
#include <QVBoxLayout>
#include <QPaintEvent>
#include <QStyleOption>
#include "Config.h"
#include "FlatButton.h"
......@@ -27,7 +29,6 @@ LogoutDialog::LogoutDialog(QWidget *parent)
: QFrame(parent)
{
setMaximumSize(400, 400);
// setStyleSheet("background-color: #fff");
auto layout = new QVBoxLayout(this);
layout->setSpacing(30);
......@@ -52,7 +53,6 @@ LogoutDialog::LogoutDialog(QWidget *parent)
auto label = new QLabel(tr("Logout. Are you sure?"), this);
label->setFont(font);
// label->setStyleSheet("color: #333333");
layout->addWidget(label);
layout->addLayout(buttonLayout);
......@@ -60,3 +60,12 @@ LogoutDialog::LogoutDialog(QWidget *parent)
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
connect(cancelBtn_, &QPushButton::clicked, [=]() { emit closing(false); });
}
void
LogoutDialog::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
......@@ -15,6 +15,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QStyleOption>
#include "RegisterPage.h"
#include "Avatar.h"
#include "Config.h"
......@@ -186,4 +188,13 @@ RegisterPage::onRegisterButtonClicked()
}
}
void
RegisterPage::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
RegisterPage::~RegisterPage() {}
......@@ -152,3 +152,12 @@ UserSettingsPage::resizeEvent(QResizeEvent *event)
QWidget::resizeEvent(event);
}
void
UserSettingsPage::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
......@@ -15,6 +15,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <QStyleOption>
#include <QLabel>
#include <QLayout>
......@@ -83,3 +84,12 @@ WelcomePage::WelcomePage(QWidget *parent)
connect(registerBtn_, &QPushButton::clicked, this, &WelcomePage::userRegister);
connect(loginBtn_, &QPushButton::clicked, this, &WelcomePage::userLogin);
}
void
WelcomePage::paintEvent(QPaintEvent *)
{
QStyleOption opt;
opt.init(this);
QPainter p(this);
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment