diff options
author | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-09 00:17:08 +0200 |
---|---|---|
committer | Konstantinos Sideris <sideris.konstantin@gmail.com> | 2017-11-09 00:17:08 +0200 |
commit | 9c331905e6cea902abbd5e727d7503de4760d5aa (patch) | |
tree | d5fd4b144e7585b3b7415d95b9a09a9e0e6c7e7e /src | |
parent | Remove unnecessary layouts (diff) | |
download | nheko-9c331905e6cea902abbd5e727d7503de4760d5aa.tar.xz |
Fix initial sidebar width
Diffstat (limited to 'src')
-rw-r--r-- | src/ChatPage.cc | 3 | ||||
-rw-r--r-- | src/MainWindow.cc | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/ChatPage.cc b/src/ChatPage.cc index 3f9c6fb0..b07729cf 100644 --- a/src/ChatPage.cc +++ b/src/ChatPage.cc @@ -62,7 +62,7 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent) // SideBar sideBar_ = new QFrame(this); - sideBar_->setMinimumSize(QSize(ui::sidebar::NormalSize, 0)); + sideBar_->setMinimumSize(QSize(ui::sidebar::NormalSize, parent->height())); sideBarLayout_ = new QVBoxLayout(sideBar_); sideBarLayout_->setSpacing(0); sideBarLayout_->setMargin(0); @@ -93,6 +93,7 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent) // Splitter splitter->addWidget(sideBar_); splitter->addWidget(content_); + splitter->setSizes({ui::sidebar::NormalSize, parent->width() - ui::sidebar::NormalSize}); text_input_ = new TextInputWidget(this); typingDisplay_ = new TypingDisplay(this); diff --git a/src/MainWindow.cc b/src/MainWindow.cc index 9653897d..c5735b68 100644 --- a/src/MainWindow.cc +++ b/src/MainWindow.cc @@ -41,14 +41,11 @@ MainWindow::MainWindow(QWidget *parent) , progressModal_{nullptr} , spinner_{nullptr} { - QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum); - setSizePolicy(sizePolicy); setWindowTitle("nheko"); setObjectName("MainWindow"); setStyleSheet("QWidget#MainWindow {background-color: #fff}"); restoreWindowSize(); - setMinimumSize(QSize(conf::window::minWidth, conf::window::minHeight)); QFont font("Open Sans"); font.setPixelSize(conf::fontSize); |