Fix initial sidebar width

This commit is contained in:
Konstantinos Sideris 2017-11-09 00:17:08 +02:00
parent a6b84fac45
commit 9c331905e6
2 changed files with 2 additions and 4 deletions

View file

@ -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);

View file

@ -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);