2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-04 16:35:44 +00:00

Allow creating desktop part of multi-theme.

This commit is contained in:
John Preston
2019-09-05 13:51:36 +03:00
parent 79106e0c01
commit 4951eeac98
24 changed files with 300 additions and 233 deletions

View File

@@ -313,10 +313,12 @@ void Widget::setupScrollUpButton() {
scrollToTop();
});
Core::InstallEventFilter(_scrollToTop, [=](not_null<QEvent*> event) {
if (event->type() == QEvent::Wheel) {
return _scroll->viewportEvent(event);
if (event->type() != QEvent::Wheel) {
return Core::EventFilter::Result::Continue;
}
return false;
return _scroll->viewportEvent(event)
? Core::EventFilter::Result::Cancel
: Core::EventFilter::Result::Continue;
});
updateScrollUpVisibility();
}