2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Removed App::wnd from classes that have pointer to Window::Controller.

This commit is contained in:
23rd
2021-02-03 06:31:11 +03:00
committed by John Preston
parent 0783a682dc
commit 0b4d0b83c2
12 changed files with 71 additions and 79 deletions

View File

@@ -414,7 +414,7 @@ void InnerWidget::paintEvent(QPaintEvent *e) {
Painter p(this);
const auto r = e->rect();
if (App::wnd()->contentOverlapped(this, r)) {
if (_controller->widget()->contentOverlapped(this, r)) {
return;
}
const auto activeEntry = _controller->activeChatEntryCurrent();

View File

@@ -711,7 +711,7 @@ void Widget::animationCallback() {
updateControlsVisibility(true);
if (!_filter->hasFocus()) {
if (App::wnd()) App::wnd()->setInnerFocus();
controller()->widget()->setInnerFocus();
}
}
}
@@ -957,7 +957,7 @@ void Widget::onChooseByDrag() {
}
void Widget::showMainMenu() {
App::wnd()->showMainMenu();
controller()->widget()->showMainMenu();
}
void Widget::searchMessages(
@@ -1704,7 +1704,9 @@ void Widget::keyPressEvent(QKeyEvent *e) {
}
void Widget::paintEvent(QPaintEvent *e) {
if (App::wnd() && App::wnd()->contentOverlapped(this, e)) return;
if (controller()->widget()->contentOverlapped(this, e)) {
return;
}
Painter p(this);
QRect r(e->rect());