diff --git a/src/ChatPage.cc b/src/ChatPage.cc index 4091086b..0b615a4c 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -49,7 +49,7 @@ ChatPage::ChatPage(QSharedPointer client, QWidget *parent) : QWidget(parent) , client_(client) { - setStyleSheet("background-color: #fff;"); +// setStyleSheet("background-color: #fff;"); topLayout_ = new QHBoxLayout(this); topLayout_->setSpacing(0); @@ -544,7 +544,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 rooms; diff --git a/src/EmojiPanel.cc b/src/EmojiPanel.cc index 3f5f8369..704e5c55 100644 --- a/src/EmojiPanel.cc +++ b/src/EmojiPanel.cc @@ -32,13 +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 {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); @@ -55,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); diff --git a/src/LoginPage.cc b/src/LoginPage.cc index 0b65f8bc..2b51385e 100644 --- a/src/LoginPage.cc +++ b/src/LoginPage.cc @@ -30,7 +30,7 @@ LoginPage::LoginPage(QSharedPointer 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 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 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 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 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 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); diff --git a/src/LogoutDialog.cc b/src/LogoutDialog.cc index 7f2cdbd3..94eab0ac 100644 --- a/src/LogoutDialog.cc +++ b/src/LogoutDialog.cc @@ -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); diff --git a/src/MainWindow.cc b/src/MainWindow.cc index c5735b68..6a2a276c 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -43,7 +43,7 @@ MainWindow::MainWindow(QWidget *parent) { setWindowTitle("nheko"); setObjectName("MainWindow"); - setStyleSheet("QWidget#MainWindow {background-color: #fff}"); +// setStyleSheet("QWidget#MainWindow {background-color: #fff}"); restoreWindowSize(); @@ -204,7 +204,7 @@ MainWindow::showChatPage(QString userid, QString homeserver, QString token) spinner_ = QSharedPointer( new LoadingIndicator(this), [=](LoadingIndicator *indicator) { indicator->deleteLater(); }); - spinner_->setColor("#acc7dc"); +// spinner_->setColor("#acc7dc"); spinner_->setFixedHeight(100); spinner_->setFixedWidth(100); spinner_->start(); diff --git a/src/RegisterPage.cc b/src/RegisterPage.cc index 304a7dc0..0fe89fdf 100644 --- a/src/RegisterPage.cc +++ b/src/RegisterPage.cc @@ -28,7 +28,7 @@ RegisterPage::RegisterPage(QSharedPointer 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 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 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); diff --git a/src/RoomInfoListItem.cc b/src/RoomInfoListItem.cc index 49b24b58..086a3ab7 100644 --- a/src/RoomInfoListItem.cc +++ b/src/RoomInfoListItem.cc @@ -95,12 +95,12 @@ RoomInfoListItem::paintEvent(QPaintEvent *event) p.setRenderHint(QPainter::SmoothPixmapTransform); p.setRenderHint(QPainter::Antialiasing); - if (isPressed_) - p.fillRect(rect(), QColor("#38A3D8")); - else if (underMouse()) - p.fillRect(rect(), QColor(200, 200, 200, 128)); - else - p.fillRect(rect(), QColor("#FFF")); +// if (isPressed_) +// p.fillRect(rect(), QColor("#38A3D8")); +// else if (underMouse()) +// p.fillRect(rect(), QColor(200, 200, 200, 128)); +// else +// p.fillRect(rect(), QColor("#FFF")); QFont font; font.setPixelSize(conf::fontSize); diff --git a/src/TextInputWidget.cc b/src/TextInputWidget.cc index ad053ea3..d779fdd1 100644 --- a/src/TextInputWidget.cc +++ b/src/TextInputWidget.cc @@ -173,7 +173,6 @@ TextInputWidget::TextInputWidget(QWidget *parent) setFixedHeight(conf::textInput::height); setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); setCursor(Qt::ArrowCursor); - setStyleSheet("background-color: #fff;"); topLayout_ = new QHBoxLayout(); topLayout_->setSpacing(0); @@ -199,9 +198,13 @@ TextInputWidget::TextInputWidget(QWidget *parent) input_->setFont(font); input_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); input_->setPlaceholderText(tr("Write a message...")); - input_->setStyleSheet("color: #333333; border: none; padding-top: 5px; margin: 0 5px"); + input_->setStyleSheet("border: none; padding-top: 5px; margin: 0 5px"); sendMessageBtn_ = new FlatButton(this); +<<<<<<< HEAD +======= +// sendMessageBtn_->setForegroundColor(QColor("#acc7dc")); +>>>>>>> Remove a bunch of hardcoded colors QIcon send_message_icon; send_message_icon.addFile(":/icons/icons/ui/cursor.png"); diff --git a/src/TimelineItem.cc b/src/TimelineItem.cc index efc12d42..85721117 100644 --- a/src/TimelineItem.cc +++ b/src/TimelineItem.cc @@ -30,7 +30,7 @@ #include "TimelineViewManager.h" static const QRegExp URL_REGEX("((?:https?|ftp)://\\S+)"); -static const QString URL_HTML = "\\1"; +static const QString URL_HTML = "\\1"; namespace events = matrix::events; namespace msgs = matrix::events::messages; @@ -205,7 +205,7 @@ TimelineItem::TimelineItem(const events::MessageEvent &event, body.replace(URL_REGEX, URL_HTML); body.replace("\n", "
"); - body = "" + body + ""; + body = "" + body + ""; if (with_sender) { auto displayName = TimelineViewManager::displayName(event.sender()); @@ -308,7 +308,7 @@ TimelineItem::TimelineItem(const events::MessageEvent &event, void TimelineItem::generateBody(const QString &body) { - QString content(" %1 "); + QString content(" %1 "); body_ = new QLabel(this); body_->setFont(font_); @@ -332,8 +332,8 @@ TimelineItem::generateBody(const QString &userid, const QString &body) sender = userid.split(":")[0].split("@")[1]; } - QString userContent(" %1 "); - QString bodyContent(" %1 "); + QString userContent(" %1 "); + QString bodyContent(" %1 "); QFont usernameFont = font_; usernameFont.setBold(true); @@ -357,7 +357,7 @@ TimelineItem::generateBody(const QString &userid, const QString &body) void TimelineItem::generateTimestamp(const QDateTime &time) { - QString msg(" %1 "); + QString msg(" %1 "); QFont timestampFont; timestampFont.setPixelSize(conf::timeline::fonts::timestamp); @@ -399,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 diff --git a/src/TopRoomBar.cc b/src/TopRoomBar.cc index 7bec888d..d852ae32 100644 --- a/src/TopRoomBar.cc +++ b/src/TopRoomBar.cc @@ -41,8 +41,6 @@ TopRoomBar::TopRoomBar(QWidget *parent) avatar_ = new Avatar(this); avatar_->setLetter(QChar('?')); - avatar_->setBackgroundColor(QColor("#d6dde3")); - avatar_->setTextColor(QColor("#555459")); avatar_->setSize(35); textLayout_ = new QVBoxLayout(); diff --git a/src/UserInfoWidget.cc b/src/UserInfoWidget.cc index f5f3db74..aac3e592 100644 --- a/src/UserInfoWidget.cc +++ b/src/UserInfoWidget.cc @@ -45,15 +45,15 @@ 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); displayNameLabel_ = new QLabel(this); displayNameLabel_->setFont(nameFont); - displayNameLabel_->setStyleSheet("padding: 0 9px; color: #171919; margin-bottom: -10px;"); + displayNameLabel_->setStyleSheet("padding: 0 9px; margin-bottom: -10px;"); displayNameLabel_->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignTop); QFont useridFont("Open Sans"); @@ -61,7 +61,7 @@ UserInfoWidget::UserInfoWidget(QWidget *parent) userIdLabel_ = new QLabel(this); userIdLabel_->setFont(useridFont); - userIdLabel_->setStyleSheet("padding: 0 8px 8px 8px; color: #555459;"); + userIdLabel_->setStyleSheet("padding: 0 8px 8px 8px;"); userIdLabel_->setAlignment(Qt::AlignLeading | Qt::AlignLeft | Qt::AlignVCenter); avatarLayout_->addWidget(userAvatar_); diff --git a/src/ui/Badge.cc b/src/ui/Badge.cc index 6e73eca0..0b6bd25f 100644 --- a/src/ui/Badge.cc +++ b/src/ui/Badge.cc @@ -176,7 +176,7 @@ Badge::paintEvent(QPaintEvent *) QBrush brush; brush.setStyle(Qt::SolidPattern); - brush.setColor(isEnabled() ? backgroundColor() : QColor("#cccccc")); +// brush.setColor(isEnabled() ? backgroundColor() : QColor("#cccccc")); painter.setBrush(brush); painter.setPen(Qt::NoPen);