Add common style for the scroll bars

This commit is contained in:
Konstantinos Sideris 2017-04-24 17:06:34 +03:00
parent 3c5382c2d8
commit 6d9acc8621
3 changed files with 10 additions and 7 deletions

View file

@ -30,12 +30,7 @@ HistoryViewManager::HistoryViewManager(QSharedPointer<MatrixClient> 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)),

View file

@ -34,7 +34,9 @@ RoomList::RoomList(QSharedPointer<MatrixClient> 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 &)),

View file

@ -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);