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

Alpha 1.0.34: Fix tabbed section widget render.

Also fix error message layout in EditCaptionBox.
This commit is contained in:
John Preston
2017-04-21 16:17:54 +03:00
parent 8f719f8c06
commit 33ffa0715d
9 changed files with 44 additions and 18 deletions

View File

@@ -2212,6 +2212,22 @@ void MainWidget::ui_showPeerHistory(quint64 peerId, qint32 showAtMsgId, Ui::Show
}
return false;
};
// Qt bug workaround: QWidget::render() for an arbitrary widget calls
// sendPendingMoveAndResizeEvents(true, true) for the whole window,
// which does something like:
//
// setAttribute(Qt::WA_UpdatesDisabled);
// sendEvent(QResizeEvent);
// setAttribute(Qt::WA_UpdatesDisabled, false);
//
// So if we create TabbedSection widget in HistoryWidget::resizeEvent()
// it will get an enabled Qt::WA_UpdatesDisabled from its parent and it
// will never be rendered, because no one will ever remove that attribute.
//
// So we force HistoryWidget::resizeEvent() here, without WA_UpdatesDisabled.
myEnsureResized(_history);
auto animationParams = animatedShow() ? prepareHistoryAnimation(peerId) : Window::SectionSlideParams();
if (_history->peer() && _history->peer()->id != peerId && way != Ui::ShowWay::Forward) {