Skip to content
Snippets Groups Projects
Commit 8386dd73 authored by Konstantinos Sideris's avatar Konstantinos Sideris
Browse files

Enable scrollbar on the room list for macOS (#174)

parent 069f0a1f
No related branches found
No related tags found
No related merge requests found
......@@ -45,6 +45,7 @@ PopupItem {
RoomList,
RoomList > * {
background-color: #2d3139;
border: none;
}
CommunitiesList,
......
......@@ -45,6 +45,7 @@ PopupItem {
RoomList,
RoomList > * {
background-color: white;
border: none;
}
CommunitiesList,
......
......@@ -70,6 +70,11 @@ RegisterPage {
background-color: palette(window);
}
RoomList,
RoomList > * {
border: none;
}
RoomInfoListItem {
qproperty-highlightedBackgroundColor: palette(highlight);
qproperty-hoverBackgroundColor: palette(light);
......
......@@ -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_);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment