mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Remove unnecessary comments
This commit is contained in:
parent
56d8be5a27
commit
fc34f373df
16 changed files with 15 additions and 52 deletions
|
@ -38,7 +38,7 @@ signals:
|
||||||
void emojiSelected(const QString &emoji);
|
void emojiSelected(const QString &emoji);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void clickIndex(const QModelIndex &index)
|
void clickIndex(const QModelIndex &index)
|
||||||
|
|
|
@ -11,7 +11,7 @@ public:
|
||||||
explicit LeaveRoomDialog(QWidget *parent = nullptr);
|
explicit LeaveRoomDialog(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closing(bool isLeaving);
|
void closing(bool isLeaving);
|
||||||
|
|
|
@ -43,7 +43,7 @@ signals:
|
||||||
void backButtonClicked();
|
void backButtonClicked();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
// Displays errors produced during the login.
|
// Displays errors produced during the login.
|
||||||
|
|
|
@ -28,7 +28,7 @@ public:
|
||||||
explicit LogoutDialog(QWidget *parent = nullptr);
|
explicit LogoutDialog(QWidget *parent = nullptr);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closing(bool isLoggingOut);
|
void closing(bool isLoggingOut);
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
~RegisterPage();
|
~RegisterPage();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void backButtonClicked();
|
void backButtonClicked();
|
||||||
|
|
|
@ -65,7 +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;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void moveBack();
|
void moveBack();
|
||||||
|
|
|
@ -29,7 +29,7 @@ public:
|
||||||
explicit WelcomePage(QWidget *parent = 0);
|
explicit WelcomePage(QWidget *parent = 0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent *event) override;
|
void paintEvent(QPaintEvent *event) override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
// Notify that the user wants to login in.
|
// Notify that the user wants to login in.
|
||||||
|
|
|
@ -545,7 +545,7 @@ ChatPage::showQuickSwitcher()
|
||||||
new OverlayModal(MainWindow::instance(), quickSwitcher_.data()),
|
new OverlayModal(MainWindow::instance(), quickSwitcher_.data()),
|
||||||
[=](OverlayModal *modal) { modal->deleteLater(); });
|
[=](OverlayModal *modal) { modal->deleteLater(); });
|
||||||
quickSwitcherModal_->setDuration(0);
|
quickSwitcherModal_->setDuration(0);
|
||||||
// quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
|
quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
|
||||||
}
|
}
|
||||||
|
|
||||||
QMap<QString, QString> rooms;
|
QMap<QString, QString> rooms;
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
* 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 <QPainter>
|
||||||
#include <QScrollBar>
|
#include <QScrollBar>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
#include <QPainter>
|
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "EmojiCategory.h"
|
#include "EmojiCategory.h"
|
||||||
|
@ -69,7 +69,7 @@ EmojiCategory::EmojiCategory(QString category, QList<Emoji> emoji, QWidget *pare
|
||||||
|
|
||||||
category_ = new QLabel(category, this);
|
category_ = new QLabel(category, this);
|
||||||
category_->setFont(font);
|
category_->setFont(font);
|
||||||
category_->setStyleSheet("margin: 20px 0 20px 8px;");
|
category_->setStyleSheet("margin: 20px 0 20px 8px;");
|
||||||
|
|
||||||
mainLayout_->addWidget(category_);
|
mainLayout_->addWidget(category_);
|
||||||
mainLayout_->addWidget(emojiListView_);
|
mainLayout_->addWidget(emojiListView_);
|
||||||
|
|
|
@ -10,7 +10,6 @@ JoinRoomDialog::JoinRoomDialog(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);
|
||||||
|
@ -35,7 +34,6 @@ JoinRoomDialog::JoinRoomDialog(QWidget *parent)
|
||||||
|
|
||||||
auto label = new QLabel(tr("Room alias to join:"), this);
|
auto label = new QLabel(tr("Room alias to join:"), this);
|
||||||
label->setFont(font);
|
label->setFont(font);
|
||||||
label->setStyleSheet("color: #333333");
|
|
||||||
|
|
||||||
roomAliasEdit_ = new QLineEdit(this);
|
roomAliasEdit_ = new QLineEdit(this);
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
|
@ -11,7 +11,6 @@ LeaveRoomDialog::LeaveRoomDialog(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);
|
||||||
|
|
|
@ -17,11 +17,11 @@
|
||||||
|
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "LoginPage.h"
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
#include "InputValidator.h"
|
#include "InputValidator.h"
|
||||||
#include "LoadingIndicator.h"
|
#include "LoadingIndicator.h"
|
||||||
|
#include "LoginPage.h"
|
||||||
#include "MatrixClient.h"
|
#include "MatrixClient.h"
|
||||||
#include "OverlayModal.h"
|
#include "OverlayModal.h"
|
||||||
#include "RaisedButton.h"
|
#include "RaisedButton.h"
|
||||||
|
@ -32,8 +32,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
, inferredServerAddress_()
|
, inferredServerAddress_()
|
||||||
, client_{client}
|
, client_{client}
|
||||||
{
|
{
|
||||||
// setStyleSheet("background-color: #fff");
|
|
||||||
|
|
||||||
top_layout_ = new QVBoxLayout();
|
top_layout_ = new QVBoxLayout();
|
||||||
|
|
||||||
top_bar_layout_ = new QHBoxLayout();
|
top_bar_layout_ = new QHBoxLayout();
|
||||||
|
@ -42,7 +40,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
|
|
||||||
back_button_ = new FlatButton(this);
|
back_button_ = new FlatButton(this);
|
||||||
back_button_->setMinimumSize(QSize(30, 30));
|
back_button_->setMinimumSize(QSize(30, 30));
|
||||||
// back_button_->setForegroundColor("#333333");
|
|
||||||
|
|
||||||
top_bar_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter);
|
top_bar_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter);
|
||||||
top_bar_layout_->addStretch(1);
|
top_bar_layout_->addStretch(1);
|
||||||
|
@ -77,10 +74,7 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
form_wrapper_->addStretch(1);
|
form_wrapper_->addStretch(1);
|
||||||
|
|
||||||
matrixid_input_ = new TextField(this);
|
matrixid_input_ = new TextField(this);
|
||||||
// matrixid_input_->setTextColor("#333333");
|
|
||||||
matrixid_input_->setLabel(tr("Matrix ID"));
|
matrixid_input_->setLabel(tr("Matrix ID"));
|
||||||
// matrixid_input_->setInkColor("#555459");
|
|
||||||
// matrixid_input_->setBackgroundColor("#fff");
|
|
||||||
matrixid_input_->setPlaceholderText(tr("e.g @joe:matrix.org"));
|
matrixid_input_->setPlaceholderText(tr("e.g @joe:matrix.org"));
|
||||||
|
|
||||||
spinner_ = new LoadingIndicator(this);
|
spinner_ = new LoadingIndicator(this);
|
||||||
|
@ -97,17 +91,11 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
matrixidLayout_->addWidget(matrixid_input_, 0, Qt::AlignVCenter);
|
matrixidLayout_->addWidget(matrixid_input_, 0, Qt::AlignVCenter);
|
||||||
|
|
||||||
password_input_ = new TextField(this);
|
password_input_ = new TextField(this);
|
||||||
// password_input_->setTextColor("#333333");
|
|
||||||
password_input_->setLabel(tr("Password"));
|
password_input_->setLabel(tr("Password"));
|
||||||
// password_input_->setInkColor("#555459");
|
|
||||||
// password_input_->setBackgroundColor("#fff");
|
|
||||||
password_input_->setEchoMode(QLineEdit::Password);
|
password_input_->setEchoMode(QLineEdit::Password);
|
||||||
|
|
||||||
serverInput_ = new TextField(this);
|
serverInput_ = new TextField(this);
|
||||||
// serverInput_->setTextColor("#333333");
|
|
||||||
serverInput_->setLabel("Homeserver address");
|
serverInput_->setLabel("Homeserver address");
|
||||||
// serverInput_->setInkColor("#555459");
|
|
||||||
// serverInput_->setBackgroundColor("#fff");
|
|
||||||
serverInput_->setPlaceholderText("matrix.org");
|
serverInput_->setPlaceholderText("matrix.org");
|
||||||
serverInput_->hide();
|
serverInput_->hide();
|
||||||
|
|
||||||
|
@ -123,8 +111,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
button_layout_->setContentsMargins(0, 0, 0, 30);
|
button_layout_->setContentsMargins(0, 0, 0, 30);
|
||||||
|
|
||||||
login_button_ = new RaisedButton(tr("LOGIN"), this);
|
login_button_ = new RaisedButton(tr("LOGIN"), this);
|
||||||
// login_button_->setBackgroundColor(QColor("#333333"));
|
|
||||||
// login_button_->setForegroundColor(QColor("white"));
|
|
||||||
login_button_->setMinimumSize(350, 65);
|
login_button_->setMinimumSize(350, 65);
|
||||||
login_button_->setFontSize(20);
|
login_button_->setFontSize(20);
|
||||||
login_button_->setCornerRadius(3);
|
login_button_->setCornerRadius(3);
|
||||||
|
@ -138,7 +124,6 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
|
|
||||||
error_label_ = new QLabel(this);
|
error_label_ = new QLabel(this);
|
||||||
error_label_->setFont(font);
|
error_label_->setFont(font);
|
||||||
// error_label_->setStyleSheet("color: #E22826");
|
|
||||||
|
|
||||||
top_layout_->addLayout(top_bar_layout_);
|
top_layout_->addLayout(top_bar_layout_);
|
||||||
top_layout_->addStretch(1);
|
top_layout_->addStretch(1);
|
||||||
|
|
|
@ -16,9 +16,9 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
#include <QVBoxLayout>
|
|
||||||
#include <QPaintEvent>
|
#include <QPaintEvent>
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
|
|
|
@ -17,21 +17,19 @@
|
||||||
|
|
||||||
#include <QStyleOption>
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "RegisterPage.h"
|
|
||||||
#include "Avatar.h"
|
#include "Avatar.h"
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "FlatButton.h"
|
#include "FlatButton.h"
|
||||||
#include "InputValidator.h"
|
#include "InputValidator.h"
|
||||||
#include "MatrixClient.h"
|
#include "MatrixClient.h"
|
||||||
#include "RaisedButton.h"
|
#include "RaisedButton.h"
|
||||||
|
#include "RegisterPage.h"
|
||||||
#include "TextField.h"
|
#include "TextField.h"
|
||||||
|
|
||||||
RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
: QWidget(parent)
|
: QWidget(parent)
|
||||||
, client_(client)
|
, client_(client)
|
||||||
{
|
{
|
||||||
// setStyleSheet("background-color: #fff");
|
|
||||||
|
|
||||||
top_layout_ = new QVBoxLayout();
|
top_layout_ = new QVBoxLayout();
|
||||||
|
|
||||||
back_layout_ = new QHBoxLayout();
|
back_layout_ = new QHBoxLayout();
|
||||||
|
@ -75,30 +73,18 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
form_wrapper_->addStretch(1);
|
form_wrapper_->addStretch(1);
|
||||||
|
|
||||||
username_input_ = new TextField();
|
username_input_ = new TextField();
|
||||||
// username_input_->setTextColor("#333333");
|
|
||||||
username_input_->setLabel(tr("Username"));
|
username_input_->setLabel(tr("Username"));
|
||||||
// username_input_->setInkColor("#555459");
|
|
||||||
// username_input_->setBackgroundColor("#fff");
|
|
||||||
|
|
||||||
password_input_ = new TextField();
|
password_input_ = new TextField();
|
||||||
// password_input_->setTextColor("#333333");
|
|
||||||
password_input_->setLabel(tr("Password"));
|
password_input_->setLabel(tr("Password"));
|
||||||
// password_input_->setInkColor("#555459");
|
|
||||||
// password_input_->setBackgroundColor("#fff");
|
|
||||||
password_input_->setEchoMode(QLineEdit::Password);
|
password_input_->setEchoMode(QLineEdit::Password);
|
||||||
|
|
||||||
password_confirmation_ = new TextField();
|
password_confirmation_ = new TextField();
|
||||||
// password_confirmation_->setTextColor("#333333");
|
|
||||||
password_confirmation_->setLabel(tr("Password confirmation"));
|
password_confirmation_->setLabel(tr("Password confirmation"));
|
||||||
// password_confirmation_->setInkColor("#555459");
|
|
||||||
// password_confirmation_->setBackgroundColor("#fff");
|
|
||||||
password_confirmation_->setEchoMode(QLineEdit::Password);
|
password_confirmation_->setEchoMode(QLineEdit::Password);
|
||||||
|
|
||||||
server_input_ = new TextField();
|
server_input_ = new TextField();
|
||||||
// server_input_->setTextColor("#333333");
|
|
||||||
server_input_->setLabel(tr("Home Server"));
|
server_input_->setLabel(tr("Home Server"));
|
||||||
// server_input_->setInkColor("#555459");
|
|
||||||
// server_input_->setBackgroundColor("#fff");
|
|
||||||
|
|
||||||
form_layout_->addWidget(username_input_, Qt::AlignHCenter, 0);
|
form_layout_->addWidget(username_input_, Qt::AlignHCenter, 0);
|
||||||
form_layout_->addWidget(password_input_, Qt::AlignHCenter, 0);
|
form_layout_->addWidget(password_input_, Qt::AlignHCenter, 0);
|
||||||
|
@ -114,11 +100,8 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
|
|
||||||
error_label_ = new QLabel(this);
|
error_label_ = new QLabel(this);
|
||||||
error_label_->setFont(font);
|
error_label_->setFont(font);
|
||||||
// error_label_->setStyleSheet("color: #E22826");
|
|
||||||
|
|
||||||
register_button_ = new RaisedButton(tr("REGISTER"), this);
|
register_button_ = new RaisedButton(tr("REGISTER"), this);
|
||||||
// register_button_->setBackgroundColor(QColor("#333333"));
|
|
||||||
// register_button_->setForegroundColor(QColor("white"));
|
|
||||||
register_button_->setMinimumSize(350, 65);
|
register_button_->setMinimumSize(350, 65);
|
||||||
register_button_->setFontSize(conf::btn::fontSize);
|
register_button_->setFontSize(conf::btn::fontSize);
|
||||||
register_button_->setCornerRadius(conf::btn::cornerRadius);
|
register_button_->setCornerRadius(conf::btn::cornerRadius);
|
||||||
|
|
|
@ -46,8 +46,6 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
|
||||||
userAvatar_->setObjectName("userAvatar");
|
userAvatar_->setObjectName("userAvatar");
|
||||||
userAvatar_->setLetter(QChar('?'));
|
userAvatar_->setLetter(QChar('?'));
|
||||||
userAvatar_->setSize(55);
|
userAvatar_->setSize(55);
|
||||||
// userAvatar_->setBackgroundColor("#fff");
|
|
||||||
// userAvatar_->setTextColor("#333333");
|
|
||||||
|
|
||||||
QFont nameFont("Open Sans SemiBold");
|
QFont nameFont("Open Sans SemiBold");
|
||||||
nameFont.setPixelSize(conf::userInfoWidget::fonts::displayName);
|
nameFont.setPixelSize(conf::userInfoWidget::fonts::displayName);
|
||||||
|
|
|
@ -15,9 +15,9 @@
|
||||||
* 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>
|
||||||
|
#include <QStyleOption>
|
||||||
|
|
||||||
#include "Config.h"
|
#include "Config.h"
|
||||||
#include "RaisedButton.h"
|
#include "RaisedButton.h"
|
||||||
|
|
Loading…
Reference in a new issue