mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Alpha 1.0.34: Fix tabbed section widget render.
Also fix error message layout in EditCaptionBox.
This commit is contained in:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user