From 8386dd73ced2fa901ccab867cd4b481f67fa4287 Mon Sep 17 00:00:00 2001 From: Konstantinos Sideris Date: Wed, 25 Jul 2018 18:59:33 +0300 Subject: Enable scrollbar on the room list for macOS (#174) --- src/RoomList.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/RoomList.cpp b/src/RoomList.cpp index 1e0a68d9..86b9714d 100644 --- a/src/RoomList.cpp +++ b/src/RoomList.cpp @@ -34,18 +34,22 @@ RoomList::RoomList(QSharedPointer userSettings, QWidget *parent) : QWidget(parent) , userSettings_{userSettings} { - setStyleSheet("border: none;"); topLayout_ = new QVBoxLayout(this); topLayout_->setSpacing(0); topLayout_->setMargin(0); scrollArea_ = new QScrollArea(this); scrollArea_->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); - scrollArea_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); scrollArea_->setSizeAdjustPolicy(QAbstractScrollArea::AdjustToContents); scrollArea_->setWidgetResizable(true); scrollArea_->setAlignment(Qt::AlignLeading | Qt::AlignTop | Qt::AlignVCenter); + // The scrollbar on macOS will hide itself when not active so it won't interfere + // with the content. +#if not defined(Q_OS_MAC) + scrollArea_->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); +#endif + scrollAreaContents_ = new QWidget(this); contentsLayout_ = new QVBoxLayout(scrollAreaContents_); -- cgit 1.5.1