2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Open theme editor for existing themes.

This commit is contained in:
John Preston
2019-09-05 08:18:21 +03:00
parent dd74f57a66
commit 03bdd80b2f
11 changed files with 111 additions and 91 deletions

View File

@@ -590,8 +590,8 @@ void MainWindow::reActivateWindow() {
}
void MainWindow::showRightColumn(object_ptr<TWidget> widget) {
auto wasWidth = width();
auto wasRightWidth = _rightColumn ? _rightColumn->width() : 0;
const auto wasWidth = width();
const auto wasRightWidth = _rightColumn ? _rightColumn->width() : 0;
_rightColumn = std::move(widget);
if (_rightColumn) {
_rightColumn->setParent(this);
@@ -600,13 +600,14 @@ void MainWindow::showRightColumn(object_ptr<TWidget> widget) {
} else if (App::wnd()) {
App::wnd()->setInnerFocus();
}
auto nowRightWidth = _rightColumn ? _rightColumn->width() : 0;
setMinimumWidth(st::windowMinWidth + nowRightWidth);
const auto nowRightWidth = _rightColumn ? _rightColumn->width() : 0;
const auto wasMaximized = isMaximized();
if (!isMaximized()) {
tryToExtendWidthBy(wasWidth + nowRightWidth - wasRightWidth - width());
} else {
updateControlsGeometry();
}
setMinimumWidth(st::windowMinWidth + nowRightWidth);
}
int MainWindow::maximalExtendBy() const {