mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix initial sidebar width
This commit is contained in:
parent
a6b84fac45
commit
9c331905e6
2 changed files with 2 additions and 4 deletions
|
@ -62,7 +62,7 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
|
|
||||||
// SideBar
|
// SideBar
|
||||||
sideBar_ = new QFrame(this);
|
sideBar_ = new QFrame(this);
|
||||||
sideBar_->setMinimumSize(QSize(ui::sidebar::NormalSize, 0));
|
sideBar_->setMinimumSize(QSize(ui::sidebar::NormalSize, parent->height()));
|
||||||
sideBarLayout_ = new QVBoxLayout(sideBar_);
|
sideBarLayout_ = new QVBoxLayout(sideBar_);
|
||||||
sideBarLayout_->setSpacing(0);
|
sideBarLayout_->setSpacing(0);
|
||||||
sideBarLayout_->setMargin(0);
|
sideBarLayout_->setMargin(0);
|
||||||
|
@ -93,6 +93,7 @@ ChatPage::ChatPage(QSharedPointer<MatrixClient> client, QWidget *parent)
|
||||||
// Splitter
|
// Splitter
|
||||||
splitter->addWidget(sideBar_);
|
splitter->addWidget(sideBar_);
|
||||||
splitter->addWidget(content_);
|
splitter->addWidget(content_);
|
||||||
|
splitter->setSizes({ui::sidebar::NormalSize, parent->width() - ui::sidebar::NormalSize});
|
||||||
|
|
||||||
text_input_ = new TextInputWidget(this);
|
text_input_ = new TextInputWidget(this);
|
||||||
typingDisplay_ = new TypingDisplay(this);
|
typingDisplay_ = new TypingDisplay(this);
|
||||||
|
|
|
@ -41,14 +41,11 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
, progressModal_{nullptr}
|
, progressModal_{nullptr}
|
||||||
, spinner_{nullptr}
|
, spinner_{nullptr}
|
||||||
{
|
{
|
||||||
QSizePolicy sizePolicy(QSizePolicy::Minimum, QSizePolicy::Minimum);
|
|
||||||
setSizePolicy(sizePolicy);
|
|
||||||
setWindowTitle("nheko");
|
setWindowTitle("nheko");
|
||||||
setObjectName("MainWindow");
|
setObjectName("MainWindow");
|
||||||
setStyleSheet("QWidget#MainWindow {background-color: #fff}");
|
setStyleSheet("QWidget#MainWindow {background-color: #fff}");
|
||||||
|
|
||||||
restoreWindowSize();
|
restoreWindowSize();
|
||||||
setMinimumSize(QSize(conf::window::minWidth, conf::window::minHeight));
|
|
||||||
|
|
||||||
QFont font("Open Sans");
|
QFont font("Open Sans");
|
||||||
font.setPixelSize(conf::fontSize);
|
font.setPixelSize(conf::fontSize);
|
||||||
|
|
Loading…
Reference in a new issue