From de3b30ed7d12bac84b825cb56a2eecd612505ad5 Mon Sep 17 00:00:00 2001 From: 23rd <23rd@vivaldi.net> Date: Wed, 4 May 2022 06:53:42 +0300 Subject: [PATCH] Added support of focus handle to sections of settings. --- Telegram/SourceFiles/info/settings/info_settings_widget.cpp | 4 ++++ Telegram/SourceFiles/info/settings/info_settings_widget.h | 1 + Telegram/SourceFiles/settings/settings_common.h | 2 ++ 3 files changed, 7 insertions(+) diff --git a/Telegram/SourceFiles/info/settings/info_settings_widget.cpp b/Telegram/SourceFiles/info/settings/info_settings_widget.cpp index 02d6d6c8d6..08742a324e 100644 --- a/Telegram/SourceFiles/info/settings/info_settings_widget.cpp +++ b/Telegram/SourceFiles/info/settings/info_settings_widget.cpp @@ -101,6 +101,10 @@ void Widget::showFinished() { _inner->showFinished(); } +void Widget::setInnerFocus() { + _inner->setInnerFocus(); +} + rpl::producer Widget::desiredShadowVisibility() const { return (_type == ::Settings::Main::Id() || _type == ::Settings::Information::Id()) diff --git a/Telegram/SourceFiles/info/settings/info_settings_widget.h b/Telegram/SourceFiles/info/settings/info_settings_widget.h index 6dddc62b60..0f4e9fd3a5 100644 --- a/Telegram/SourceFiles/info/settings/info_settings_widget.h +++ b/Telegram/SourceFiles/info/settings/info_settings_widget.h @@ -66,6 +66,7 @@ public: void saveChanges(FnMut done) override; void showFinished() override; + void setInnerFocus() override; rpl::producer desiredShadowVisibility() const override; diff --git a/Telegram/SourceFiles/settings/settings_common.h b/Telegram/SourceFiles/settings/settings_common.h index fcf46a0cf2..43ed3d6801 100644 --- a/Telegram/SourceFiles/settings/settings_common.h +++ b/Telegram/SourceFiles/settings/settings_common.h @@ -84,6 +84,8 @@ public: } virtual void showFinished() { } + virtual void setInnerFocus() { + } [[nodiscard]] virtual QPointer createPinnedToTop( not_null parent) { return nullptr;