diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-07-25 18:59:33 +0300 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2018-07-25 18:59:33 +0300 |
commit | 8386dd73ced2fa901ccab867cd4b481f67fa4287 (patch) | |
tree | 1c00791c7f687772a64dc82ef7fad2bdf282d381 | |
parent | Use native scrollbar in the timeline (diff) | |
download | nheko-8386dd73ced2fa901ccab867cd4b481f67fa4287.tar.xz |
Enable scrollbar on the room list for macOS (#174)
-rw-r--r-- | resources/styles/nheko-dark.qss | 1 | ||||
-rw-r--r-- | resources/styles/nheko.qss | 1 | ||||
-rw-r--r-- | resources/styles/system.qss | 5 | ||||
-rw-r--r-- | src/RoomList.cpp | 8 |
4 files changed, 13 insertions, 2 deletions
diff --git a/resources/styles/nheko-dark.qss b/resources/styles/nheko-dark.qss index d1a3eab2..7caa7efb 100644 --- a/resources/styles/nheko-dark.qss +++ b/resources/styles/nheko-dark.qss @@ -45,6 +45,7 @@ PopupItem { RoomList, RoomList > * { background-color: #2d3139; + border: none; } CommunitiesList, diff --git a/resources/styles/nheko.qss b/resources/styles/nheko.qss index a446d1da..3f06f79f 100644 --- a/resources/styles/nheko.qss +++ b/resources/styles/nheko.qss @@ -45,6 +45,7 @@ PopupItem { RoomList, RoomList > * { background-color: white; + border: none; } CommunitiesList, diff --git a/resources/styles/system.qss b/resources/styles/system.qss index 5f29a733..7a90e039 100644 --- a/resources/styles/system.qss +++ b/resources/styles/system.qss @@ -70,6 +70,11 @@ RegisterPage { background-color: palette(window); } +RoomList, +RoomList > * { + border: none; +} + RoomInfoListItem { qproperty-highlightedBackgroundColor: palette(highlight); qproperty-hoverBackgroundColor: palette(light); 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> 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_); |