summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-02-21 02:39:22 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-02-21 02:39:28 +0100
commit55fb5532ee15ee2261cc3be90fd523201b554051 (patch)
tree0163c693126170237e3608938e5cb35688c9488a
parentMerge pull request #125 from adasauce/118-dark-theme-issues (diff)
downloadnheko-55fb5532ee15ee2261cc3be90fd523201b554051.tar.xz
Fix opaque widget in community list
fixes #126
-rw-r--r--src/CommunitiesList.cpp6
-rw-r--r--src/CommunitiesList.h1
2 files changed, 2 insertions, 5 deletions
diff --git a/src/CommunitiesList.cpp b/src/CommunitiesList.cpp
index 2fb8731c..bb57ca40 100644
--- a/src/CommunitiesList.cpp
+++ b/src/CommunitiesList.cpp
@@ -30,16 +30,14 @@ CommunitiesList::CommunitiesList(QWidget *parent)
         scrollArea_->setWidgetResizable(true);
         scrollArea_->setAlignment(Qt::AlignLeading | Qt::AlignTop | Qt::AlignVCenter);
 
-        scrollAreaContents_ = new QWidget();
-
-        contentsLayout_ = new QVBoxLayout(scrollAreaContents_);
+        contentsLayout_ = new QVBoxLayout();
         contentsLayout_->setSpacing(0);
         contentsLayout_->setMargin(0);
 
         addGlobalItem();
         contentsLayout_->addStretch(1);
 
-        scrollArea_->setWidget(scrollAreaContents_);
+        scrollArea_->setLayout(contentsLayout_);
         topLayout_->addWidget(scrollArea_);
 
         connect(
diff --git a/src/CommunitiesList.h b/src/CommunitiesList.h
index e8042666..d3cbeeff 100644
--- a/src/CommunitiesList.h
+++ b/src/CommunitiesList.h
@@ -53,7 +53,6 @@ private:
 
         QVBoxLayout *topLayout_;
         QVBoxLayout *contentsLayout_;
-        QWidget *scrollAreaContents_;
         QScrollArea *scrollArea_;
 
         std::map<QString, QSharedPointer<CommunitiesListItem>> communities_;