mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/telegramdesktop/tdesktop
synced 2026-09-21 08:33:45 +08:00
Remove the unused top-moved helper from info content
Task: 2026/07/26/remove-dead-top-moved-helper-in-info-content-on-dev
This commit is contained in:
@@ -37,8 +37,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
||||
#include "styles/style_info.h"
|
||||
#include "styles/style_profile.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
|
||||
namespace Info {
|
||||
namespace {
|
||||
|
||||
@@ -122,7 +120,6 @@ void ContentWidget::updateControlsGeometry() {
|
||||
}
|
||||
_innerWrap->resizeToWidth(width());
|
||||
|
||||
auto newScrollTop = _scroll->scrollTop() + _topDelta;
|
||||
auto scrollGeometry = rect().marginsRemoved(
|
||||
{ 0, _scrollTopSkip.current(), 0, _scrollBottomSkip.current() });
|
||||
if (_scroll->geometry() != scrollGeometry) {
|
||||
@@ -130,9 +127,6 @@ void ContentWidget::updateControlsGeometry() {
|
||||
}
|
||||
|
||||
if (!_scroll->isHidden()) {
|
||||
if (_topDelta) {
|
||||
_scroll->scrollToY(newScrollTop);
|
||||
}
|
||||
auto scrollTop = _scroll->scrollTop();
|
||||
_innerWrap->setVisibleTopBottom(
|
||||
scrollTop,
|
||||
@@ -169,21 +163,6 @@ void ContentWidget::paintEvent(QPaintEvent *e) {
|
||||
}
|
||||
}
|
||||
|
||||
void ContentWidget::setGeometryWithTopMoved(
|
||||
const QRect &newGeometry,
|
||||
int topDelta) {
|
||||
_topDelta = topDelta;
|
||||
auto willBeResized = (size() != newGeometry.size());
|
||||
if (geometry() != newGeometry) {
|
||||
setGeometry(newGeometry);
|
||||
}
|
||||
if (!willBeResized) {
|
||||
QResizeEvent fake(size(), size());
|
||||
QCoreApplication::sendEvent(this, &fake);
|
||||
}
|
||||
_topDelta = 0;
|
||||
}
|
||||
|
||||
Ui::RpWidget *ContentWidget::doSetInnerWidget(
|
||||
object_ptr<RpWidget> inner) {
|
||||
using namespace rpl::mappers;
|
||||
|
||||
Reference in New Issue
Block a user