linting
This commit is contained in:
parent
ee893c5adf
commit
8fa01e2cd6
@ -38,15 +38,11 @@ struct DescInfo
|
||||
class RoomInfoListItem : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(QColor highlightedBackgroundColor
|
||||
READ highlightedBackgroundColor
|
||||
WRITE setHighlightedBackgroundColor)
|
||||
Q_PROPERTY(QColor hoverBackgroundColor
|
||||
READ hoverBackgroundColor
|
||||
WRITE setHoverBackgroundColor)
|
||||
Q_PROPERTY(QColor backgroundColor
|
||||
READ backgroundColor
|
||||
WRITE setBackgroundColor)
|
||||
Q_PROPERTY(QColor highlightedBackgroundColor READ highlightedBackgroundColor WRITE
|
||||
setHighlightedBackgroundColor)
|
||||
Q_PROPERTY(
|
||||
QColor hoverBackgroundColor READ hoverBackgroundColor WRITE setHoverBackgroundColor)
|
||||
Q_PROPERTY(QColor backgroundColor READ backgroundColor WRITE setBackgroundColor)
|
||||
|
||||
public:
|
||||
RoomInfoListItem(QSharedPointer<RoomSettings> settings,
|
||||
@ -71,7 +67,10 @@ public:
|
||||
inline QColor hoverBackgroundColor() const { return hoverBackgroundColor_; }
|
||||
inline QColor backgroundColor() const { return backgroundColor_; }
|
||||
|
||||
inline void setHighlightedBackgroundColor(QColor &color) { highlightedBackgroundColor_ = color; }
|
||||
inline void setHighlightedBackgroundColor(QColor &color)
|
||||
{
|
||||
highlightedBackgroundColor_ = color;
|
||||
}
|
||||
inline void setHoverBackgroundColor(QColor &color) { hoverBackgroundColor_ = color; }
|
||||
inline void setBackgroundColor(QColor &color) { backgroundColor_ = color; }
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QPainter>
|
||||
#include <QStyle>
|
||||
#include <QStyleOption>
|
||||
#include <QPainter>
|
||||
|
||||
#include "Emote.h"
|
||||
#include "Image.h"
|
||||
|
@ -64,7 +64,8 @@ struct PendingMessage
|
||||
, filename(filename)
|
||||
, event_id(event_id)
|
||||
, widget(widget)
|
||||
{}
|
||||
{
|
||||
}
|
||||
};
|
||||
|
||||
// In which place new TimelineItems should be inserted.
|
||||
|
@ -542,7 +542,7 @@ ChatPage::showQuickSwitcher()
|
||||
new OverlayModal(MainWindow::instance(), quickSwitcher_.data()),
|
||||
[=](OverlayModal *modal) { modal->deleteLater(); });
|
||||
quickSwitcherModal_->setDuration(0);
|
||||
// quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
|
||||
// quickSwitcherModal_->setColor(QColor(30, 30, 30, 170));
|
||||
}
|
||||
|
||||
QMap<QString, QString> rooms;
|
||||
|
@ -32,18 +32,18 @@ EmojiPanel::EmojiPanel(QWidget *parent)
|
||||
, animationDuration_{100}
|
||||
, categoryIconSize_{20}
|
||||
{
|
||||
// setStyleSheet(
|
||||
// "QWidget {background: #fff; color: #e8e8e8; border: none;}"
|
||||
// "QScrollBar:vertical { background-color: #fff; width: 8px; margin: 0px 2px 0 2px; }"
|
||||
// "QScrollBar::handle:vertical { background-color: #d6dde3; min-height: 20px; }"
|
||||
// "QScrollBar::add-line:vertical { border: none; background: none; }"
|
||||
// "QScrollBar::sub-line:vertical { border: none; background: none; }");
|
||||
setStyleSheet(
|
||||
"QWidget {border: none;}"
|
||||
"QScrollBar:vertical { width: 8px; margin: 0px 2px 0 2px; }"
|
||||
"QScrollBar::handle:vertical { min-height: 20px; }"
|
||||
"QScrollBar::add-line:vertical { border: none; background: none; }"
|
||||
"QScrollBar::sub-line:vertical { border: none; background: none; }");
|
||||
// setStyleSheet(
|
||||
// "QWidget {background: #fff; color: #e8e8e8; border: none;}"
|
||||
// "QScrollBar:vertical { background-color: #fff; width: 8px; margin: 0px 2px 0
|
||||
// 2px; }"
|
||||
// "QScrollBar::handle:vertical { background-color: #d6dde3; min-height: 20px; }"
|
||||
// "QScrollBar::add-line:vertical { border: none; background: none; }"
|
||||
// "QScrollBar::sub-line:vertical { border: none; background: none; }");
|
||||
setStyleSheet("QWidget {border: none;}"
|
||||
"QScrollBar:vertical { width: 8px; margin: 0px 2px 0 2px; }"
|
||||
"QScrollBar::handle:vertical { min-height: 20px; }"
|
||||
"QScrollBar::add-line:vertical { border: none; background: none; }"
|
||||
"QScrollBar::sub-line:vertical { border: none; background: none; }");
|
||||
|
||||
setAttribute(Qt::WA_TranslucentBackground, true);
|
||||
setAttribute(Qt::WA_ShowWithoutActivating, true);
|
||||
@ -60,7 +60,7 @@ EmojiPanel::EmojiPanel(QWidget *parent)
|
||||
contentLayout->setMargin(0);
|
||||
|
||||
auto emojiCategories = new QFrame(mainWidget);
|
||||
//emojiCategories->setStyleSheet("background-color: #f2f2f2");
|
||||
// emojiCategories->setStyleSheet("background-color: #f2f2f2");
|
||||
|
||||
auto categoriesLayout = new QHBoxLayout(emojiCategories);
|
||||
categoriesLayout->setSpacing(6);
|
||||
|
@ -30,7 +30,7 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
, inferredServerAddress_()
|
||||
, client_{client}
|
||||
{
|
||||
// setStyleSheet("background-color: #fff");
|
||||
// setStyleSheet("background-color: #fff");
|
||||
|
||||
top_layout_ = new QVBoxLayout();
|
||||
|
||||
@ -40,7 +40,7 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
|
||||
back_button_ = new FlatButton(this);
|
||||
back_button_->setMinimumSize(QSize(30, 30));
|
||||
//back_button_->setForegroundColor("#333333");
|
||||
// back_button_->setForegroundColor("#333333");
|
||||
|
||||
top_bar_layout_->addWidget(back_button_, 0, Qt::AlignLeft | Qt::AlignVCenter);
|
||||
top_bar_layout_->addStretch(1);
|
||||
@ -75,10 +75,10 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
form_wrapper_->addStretch(1);
|
||||
|
||||
matrixid_input_ = new TextField(this);
|
||||
// matrixid_input_->setTextColor("#333333");
|
||||
// matrixid_input_->setTextColor("#333333");
|
||||
matrixid_input_->setLabel(tr("Matrix ID"));
|
||||
// matrixid_input_->setInkColor("#555459");
|
||||
// matrixid_input_->setBackgroundColor("#fff");
|
||||
// matrixid_input_->setInkColor("#555459");
|
||||
// matrixid_input_->setBackgroundColor("#fff");
|
||||
matrixid_input_->setPlaceholderText(tr("e.g @joe:matrix.org"));
|
||||
|
||||
spinner_ = new LoadingIndicator(this);
|
||||
@ -95,17 +95,17 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
matrixidLayout_->addWidget(matrixid_input_, 0, Qt::AlignVCenter);
|
||||
|
||||
password_input_ = new TextField(this);
|
||||
// password_input_->setTextColor("#333333");
|
||||
// password_input_->setTextColor("#333333");
|
||||
password_input_->setLabel(tr("Password"));
|
||||
// password_input_->setInkColor("#555459");
|
||||
// password_input_->setBackgroundColor("#fff");
|
||||
// password_input_->setInkColor("#555459");
|
||||
// password_input_->setBackgroundColor("#fff");
|
||||
password_input_->setEchoMode(QLineEdit::Password);
|
||||
|
||||
serverInput_ = new TextField(this);
|
||||
// serverInput_->setTextColor("#333333");
|
||||
// serverInput_->setTextColor("#333333");
|
||||
serverInput_->setLabel("Homeserver address");
|
||||
// serverInput_->setInkColor("#555459");
|
||||
// serverInput_->setBackgroundColor("#fff");
|
||||
// serverInput_->setInkColor("#555459");
|
||||
// serverInput_->setBackgroundColor("#fff");
|
||||
serverInput_->setPlaceholderText("matrix.org");
|
||||
serverInput_->hide();
|
||||
|
||||
@ -121,8 +121,8 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
button_layout_->setContentsMargins(0, 0, 0, 30);
|
||||
|
||||
login_button_ = new RaisedButton(tr("LOGIN"), this);
|
||||
// login_button_->setBackgroundColor(QColor("#333333"));
|
||||
// login_button_->setForegroundColor(QColor("white"));
|
||||
// login_button_->setBackgroundColor(QColor("#333333"));
|
||||
// login_button_->setForegroundColor(QColor("white"));
|
||||
login_button_->setMinimumSize(350, 65);
|
||||
login_button_->setFontSize(20);
|
||||
login_button_->setCornerRadius(3);
|
||||
@ -136,7 +136,7 @@ LoginPage::LoginPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
|
||||
error_label_ = new QLabel(this);
|
||||
error_label_->setFont(font);
|
||||
// error_label_->setStyleSheet("color: #E22826");
|
||||
// error_label_->setStyleSheet("color: #E22826");
|
||||
|
||||
top_layout_->addLayout(top_bar_layout_);
|
||||
top_layout_->addStretch(1);
|
||||
|
@ -27,7 +27,7 @@ LogoutDialog::LogoutDialog(QWidget *parent)
|
||||
: QFrame(parent)
|
||||
{
|
||||
setMaximumSize(400, 400);
|
||||
// setStyleSheet("background-color: #fff");
|
||||
// setStyleSheet("background-color: #fff");
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
layout->setSpacing(30);
|
||||
@ -52,7 +52,7 @@ LogoutDialog::LogoutDialog(QWidget *parent)
|
||||
|
||||
auto label = new QLabel(tr("Logout. Are you sure?"), this);
|
||||
label->setFont(font);
|
||||
// label->setStyleSheet("color: #333333");
|
||||
// label->setStyleSheet("color: #333333");
|
||||
|
||||
layout->addWidget(label);
|
||||
layout->addLayout(buttonLayout);
|
||||
|
@ -28,7 +28,7 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
: QWidget(parent)
|
||||
, client_(client)
|
||||
{
|
||||
// setStyleSheet("background-color: #fff");
|
||||
// setStyleSheet("background-color: #fff");
|
||||
|
||||
top_layout_ = new QVBoxLayout();
|
||||
|
||||
@ -73,30 +73,30 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
form_wrapper_->addStretch(1);
|
||||
|
||||
username_input_ = new TextField();
|
||||
// username_input_->setTextColor("#333333");
|
||||
// username_input_->setTextColor("#333333");
|
||||
username_input_->setLabel(tr("Username"));
|
||||
// username_input_->setInkColor("#555459");
|
||||
// username_input_->setBackgroundColor("#fff");
|
||||
// username_input_->setInkColor("#555459");
|
||||
// username_input_->setBackgroundColor("#fff");
|
||||
|
||||
password_input_ = new TextField();
|
||||
// password_input_->setTextColor("#333333");
|
||||
// password_input_->setTextColor("#333333");
|
||||
password_input_->setLabel(tr("Password"));
|
||||
// password_input_->setInkColor("#555459");
|
||||
// password_input_->setBackgroundColor("#fff");
|
||||
// password_input_->setInkColor("#555459");
|
||||
// password_input_->setBackgroundColor("#fff");
|
||||
password_input_->setEchoMode(QLineEdit::Password);
|
||||
|
||||
password_confirmation_ = new TextField();
|
||||
// password_confirmation_->setTextColor("#333333");
|
||||
// password_confirmation_->setTextColor("#333333");
|
||||
password_confirmation_->setLabel(tr("Password confirmation"));
|
||||
// password_confirmation_->setInkColor("#555459");
|
||||
// password_confirmation_->setBackgroundColor("#fff");
|
||||
// password_confirmation_->setInkColor("#555459");
|
||||
// password_confirmation_->setBackgroundColor("#fff");
|
||||
password_confirmation_->setEchoMode(QLineEdit::Password);
|
||||
|
||||
server_input_ = new TextField();
|
||||
// server_input_->setTextColor("#333333");
|
||||
// server_input_->setTextColor("#333333");
|
||||
server_input_->setLabel(tr("Home Server"));
|
||||
// server_input_->setInkColor("#555459");
|
||||
// server_input_->setBackgroundColor("#fff");
|
||||
// server_input_->setInkColor("#555459");
|
||||
// server_input_->setBackgroundColor("#fff");
|
||||
|
||||
form_layout_->addWidget(username_input_, Qt::AlignHCenter, 0);
|
||||
form_layout_->addWidget(password_input_, Qt::AlignHCenter, 0);
|
||||
@ -112,11 +112,11 @@ RegisterPage::RegisterPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||
|
||||
error_label_ = new QLabel(this);
|
||||
error_label_->setFont(font);
|
||||
// error_label_->setStyleSheet("color: #E22826");
|
||||
// error_label_->setStyleSheet("color: #E22826");
|
||||
|
||||
register_button_ = new RaisedButton(tr("REGISTER"), this);
|
||||
// register_button_->setBackgroundColor(QColor("#333333"));
|
||||
// register_button_->setForegroundColor(QColor("white"));
|
||||
// register_button_->setBackgroundColor(QColor("#333333"));
|
||||
// register_button_->setForegroundColor(QColor("white"));
|
||||
register_button_->setMinimumSize(350, 65);
|
||||
register_button_->setFontSize(conf::btn::fontSize);
|
||||
register_button_->setCornerRadius(conf::btn::cornerRadius);
|
||||
|
@ -106,7 +106,7 @@ RoomInfoListItem::paintEvent(QPaintEvent *event)
|
||||
font.setPixelSize(conf::fontSize);
|
||||
QFontMetrics metrics(font);
|
||||
|
||||
//p.setPen(QColor("#333"));
|
||||
// p.setPen(QColor("#333"));
|
||||
|
||||
QRect avatarRegion(Padding, Padding, IconSize, IconSize);
|
||||
|
||||
|
@ -66,7 +66,6 @@ TimelineItem::init()
|
||||
|
||||
headerLayout_->setMargin(0);
|
||||
headerLayout_->setSpacing(conf::timeline::headerSpacing);
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
@ -400,8 +399,8 @@ TimelineItem::setupAvatarLayout(const QString &userName)
|
||||
|
||||
userAvatar_ = new Avatar(this);
|
||||
userAvatar_->setLetter(QChar(userName[0]).toUpper());
|
||||
// userAvatar_->setBackgroundColor(QColor("#eee"));
|
||||
// userAvatar_->setTextColor(QColor("black"));
|
||||
// userAvatar_->setBackgroundColor(QColor("#eee"));
|
||||
// userAvatar_->setTextColor(QColor("black"));
|
||||
userAvatar_->setSize(conf::timeline::avatarSize);
|
||||
|
||||
// TODO: The provided user name should be a UserId class
|
||||
@ -472,8 +471,8 @@ TimelineItem::~TimelineItem() {}
|
||||
void
|
||||
TimelineItem::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
@ -643,8 +643,8 @@ TimelineView::handleFailedMessage(int txnid)
|
||||
void
|
||||
TimelineView::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
QStyleOption opt;
|
||||
opt.init(this);
|
||||
QPainter p(this);
|
||||
style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
|
||||
}
|
||||
|
@ -45,8 +45,8 @@ UserInfoWidget::UserInfoWidget(QWidget *parent)
|
||||
userAvatar_ = new Avatar(this);
|
||||
userAvatar_->setLetter(QChar('?'));
|
||||
userAvatar_->setSize(55);
|
||||
// userAvatar_->setBackgroundColor("#fff");
|
||||
// userAvatar_->setTextColor("#333333");
|
||||
// userAvatar_->setBackgroundColor("#fff");
|
||||
// userAvatar_->setTextColor("#333333");
|
||||
|
||||
QFont nameFont("Open Sans SemiBold");
|
||||
nameFont.setPixelSize(conf::userInfoWidget::fonts::displayName);
|
||||
|
@ -17,12 +17,12 @@
|
||||
|
||||
#include <QApplication>
|
||||
#include <QDesktopWidget>
|
||||
#include <QFile>
|
||||
#include <QFontDatabase>
|
||||
#include <QLibraryInfo>
|
||||
#include <QNetworkProxy>
|
||||
#include <QSettings>
|
||||
#include <QTranslator>
|
||||
#include <QFile>
|
||||
|
||||
#include "MainWindow.h"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user