Skip to content

Commit

Permalink
fix(ui): restore splitter state
Browse files Browse the repository at this point in the history
Fixes qTox#4387 and qTox#2378.

This restores the state of the splitter correctly from settings in
multiple window mode and if this mode is quited.
  • Loading branch information
ezavod committed May 11, 2017
1 parent e4d4f14 commit 9d94cd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/widget/contentdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ ContentDialog::ContentDialog(SettingsWidget* settingsWidget, QWidget* parent)
}

SplitterRestorer restorer(splitter);
restorer.restore(s.getDialogSettingsGeometry(), size());
restorer.restore(s.getDialogSplitterState(), size());

currentDialog = this;
setAcceptDrops(true);
Expand Down
3 changes: 3 additions & 0 deletions src/widget/widget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -662,6 +662,9 @@ void Widget::onSeparateWindowChanged(bool separate, bool clicked)

setMinimumWidth(775);

SplitterRestorer restorer(ui->mainSplitter);
restorer.restore(Settings::getInstance().getSplitterState(), size());

onAddClicked();
} else {
int width = ui->friendList->size().width();
Expand Down

0 comments on commit 9d94cd0

Please sign in to comment.