From 6d9acc8621fbacd6333a9ae323dc4d11f3992d0e Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Mon, 24 Apr 2017 17:06:34 +0300 Subject: [PATCH] Add common style for the scroll bars --- src/HistoryViewManager.cc | 7 +------ src/RoomList.cc | 4 +++- src/main.cc | 6 ++++++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/HistoryViewManager.cc b/src/HistoryViewManager.cc index c6d33e02..5967ac12 100644 --- a/src/HistoryViewManager.cc +++ b/src/HistoryViewManager.cc @@ -30,12 +30,7 @@ HistoryViewManager::HistoryViewManager(QSharedPointer client, QWid : QStackedWidget(parent) , client_(client) { - setStyleSheet( - "QWidget {background: #f8fbfe; color: #e8e8e8; border: none;}" - "QScrollBar:vertical { background-color: #f8fbfe; width: 8px; border-radius: 20px; margin: 0px 2px 0 2px; }" - "QScrollBar::handle:vertical { border-radius : 50px; background-color : #d6dde3; }" - "QScrollBar::add-line:vertical { border: none; background: none; }" - "QScrollBar::sub-line:vertical { border: none; background: none; }"); + setStyleSheet("QWidget { background: #f8fbfe; color: #e8e8e8; border: none;}"); connect(client_.data(), SIGNAL(messageSent(const QString &, const QString &, int)), diff --git a/src/RoomList.cc b/src/RoomList.cc index 99553842..8db1e7b2 100644 --- a/src/RoomList.cc +++ b/src/RoomList.cc @@ -34,7 +34,9 @@ RoomList::RoomList(QSharedPointer client, QWidget *parent) ui->setupUi(this); ui->scrollVerticalLayout->addStretch(1); - setStyleSheet("border-top: none"); + setStyleSheet( + "QWidget { border: none; }" + "QScrollBar:vertical { width: 4px; margin: 2px 0; }"); connect(client_.data(), SIGNAL(roomAvatarRetrieved(const QString &, const QPixmap &)), diff --git a/src/main.cc b/src/main.cc index e2572901..5f03c2c3 100644 --- a/src/main.cc +++ b/src/main.cc @@ -41,6 +41,12 @@ int main(int argc, char *argv[]) QApplication app(argc, argv); app.setWindowIcon(QIcon(":/logos/nheko.png")); + app.setStyleSheet( + "QScrollBar:vertical { background-color: #f8fbfe; width: 8px; border: none; margin: 2px; }" + "QScrollBar::handle:vertical { background-color : #d6dde3; }" + "QScrollBar::add-line:vertical { border: none; background: none; }" + "QScrollBar::sub-line:vertical { border: none; background: none; }"); + QFont font("Open Sans"); app.setFont(font);