mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix minor stylistic issues on the nheko theme
This commit is contained in:
parent
929b2df6fb
commit
552941118b
13 changed files with 107 additions and 8 deletions
|
@ -10,6 +10,9 @@ class LeaveRoomDialog : public QFrame
|
||||||
public:
|
public:
|
||||||
explicit LeaveRoomDialog(QWidget *parent = nullptr);
|
explicit LeaveRoomDialog(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closing(bool isLeaving);
|
void closing(bool isLeaving);
|
||||||
|
|
||||||
|
|
|
@ -42,6 +42,9 @@ public:
|
||||||
signals:
|
signals:
|
||||||
void backButtonClicked();
|
void backButtonClicked();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Displays errors produced during the login.
|
// Displays errors produced during the login.
|
||||||
void loginError(QString error_message);
|
void loginError(QString error_message);
|
||||||
|
|
|
@ -27,6 +27,9 @@ class LogoutDialog : public QFrame
|
||||||
public:
|
public:
|
||||||
explicit LogoutDialog(QWidget *parent = nullptr);
|
explicit LogoutDialog(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closing(bool isLoggingOut);
|
void closing(bool isLoggingOut);
|
||||||
|
|
||||||
|
|
|
@ -35,6 +35,9 @@ public:
|
||||||
RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
|
RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent = 0);
|
||||||
~RegisterPage();
|
~RegisterPage();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void backButtonClicked();
|
void backButtonClicked();
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void showEvent(QShowEvent *event) override;
|
void showEvent(QShowEvent *event) override;
|
||||||
void resizeEvent(QResizeEvent *event) override;
|
void resizeEvent(QResizeEvent *event) override;
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void moveBack();
|
void moveBack();
|
||||||
|
|
|
@ -28,6 +28,9 @@ class WelcomePage : public QWidget
|
||||||
public:
|
public:
|
||||||
explicit WelcomePage(QWidget *parent = 0);
|
explicit WelcomePage(QWidget *parent = 0);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// Notify that the user wants to login in.
|
// Notify that the user wants to login in.
|
||||||
void userLogin();
|
void userLogin();
|
||||||
|
|
|
@ -1,7 +1,3 @@
|
||||||
* {
|
|
||||||
color: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
QLabel {
|
QLabel {
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
@ -10,8 +6,6 @@ QLabel {
|
||||||
|
|
||||||
TimelineView, TimelineView > * { background-color: white; }
|
TimelineView, TimelineView > * { background-color: white; }
|
||||||
|
|
||||||
QMenu, QMenu > * { background-color: white; }
|
|
||||||
|
|
||||||
FlatButton { qproperty-foregroundColor: #333; }
|
FlatButton { qproperty-foregroundColor: #333; }
|
||||||
|
|
||||||
RaisedButton { qproperty-foregroundColor: white; }
|
RaisedButton { qproperty-foregroundColor: white; }
|
||||||
|
@ -42,6 +36,10 @@ UserInfoWidget, UserInfoWidget > * {
|
||||||
color: #ebebeb;
|
color: #ebebeb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UserSettingsPage {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
Avatar {
|
Avatar {
|
||||||
qproperty-textColor: black;
|
qproperty-textColor: black;
|
||||||
qproperty-backgroundColor: #eee;
|
qproperty-backgroundColor: #eee;
|
||||||
|
@ -54,3 +52,28 @@ Avatar {
|
||||||
#userIdLabel {
|
#userIdLabel {
|
||||||
color: #555459;
|
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;
|
||||||
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
|
@ -43,3 +44,12 @@ LeaveRoomDialog::LeaveRoomDialog(QWidget *parent)
|
||||||
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
|
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
|
||||||
connect(cancelBtn_, &QPushButton::clicked, [=]() { emit closing(false); });
|
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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "LoginPage.h"
|
#include "LoginPage.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
|
@ -301,4 +303,13 @@ LoginPage::onBackButtonClicked()
|
||||||
emit backButtonClicked();
|
emit backButtonClicked();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
LoginPage::paintEvent(QPaintEvent *)
|
||||||
|
{
|
||||||
|
QStyleOption opt;
|
||||||
|
opt.init(this);
|
||||||
|
QPainter p(this);
|
||||||
|
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||||
|
}
|
||||||
|
|
||||||
LoginPage::~LoginPage() {}
|
LoginPage::~LoginPage() {}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
#include <QPaintEvent>
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
|
@ -27,7 +29,6 @@ LogoutDialog::LogoutDialog(QWidget *parent)
|
||||||
: QFrame(parent)
|
: QFrame(parent)
|
||||||
{
|
{
|
||||||
setMaximumSize(400, 400);
|
setMaximumSize(400, 400);
|
||||||
// setStyleSheet("background-color: #fff");
|
|
||||||
|
|
||||||
auto layout = new QVBoxLayout(this);
|
auto layout = new QVBoxLayout(this);
|
||||||
layout->setSpacing(30);
|
layout->setSpacing(30);
|
||||||
|
@ -52,7 +53,6 @@ LogoutDialog::LogoutDialog(QWidget *parent)
|
||||||
|
|
||||||
auto label = new QLabel(tr("Logout. Are you sure?"), this);
|
auto label = new QLabel(tr("Logout. Are you sure?"), this);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
// label->setStyleSheet("color: #333333");
|
|
||||||
|
|
||||||
layout->addWidget(label);
|
layout->addWidget(label);
|
||||||
layout->addLayout(buttonLayout);
|
layout->addLayout(buttonLayout);
|
||||||
|
@ -60,3 +60,12 @@ LogoutDialog::LogoutDialog(QWidget *parent)
|
||||||
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
|
connect(confirmBtn_, &QPushButton::clicked, [=]() { emit closing(true); });
|
||||||
connect(cancelBtn_, &QPushButton::clicked, [=]() { emit closing(false); });
|
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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "RegisterPage.h"
|
#include "RegisterPage.h"
|
||||||
#include "Avatar.h"
|
#include "Avatar.h"
|
||||||
#include "Config.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() {}
|
RegisterPage::~RegisterPage() {}
|
||||||
|
|
|
@ -152,3 +152,12 @@ UserSettingsPage::resizeEvent(QResizeEvent *event)
|
||||||
|
|
||||||
QWidget::resizeEvent(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/>.
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <QStyleOption>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QLayout>
|
#include <QLayout>
|
||||||
|
|
||||||
|
@ -83,3 +84,12 @@ WelcomePage::WelcomePage(QWidget *parent)
|
||||||
connect(registerBtn_, &QPushButton::clicked, this, &WelcomePage::userRegister);
|
connect(registerBtn_, &QPushButton::clicked, this, &WelcomePage::userRegister);
|
||||||
connect(loginBtn_, &QPushButton::clicked, this, &WelcomePage::userLogin);
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue