Added support of focus handle to sections of settings.

This commit is contained in:
23rd 2022-05-04 06:53:42 +03:00
parent a4f5e3f411
commit de3b30ed7d
3 changed files with 7 additions and 0 deletions

View File

@ -101,6 +101,10 @@ void Widget::showFinished() {
_inner->showFinished(); _inner->showFinished();
} }
void Widget::setInnerFocus() {
_inner->setInnerFocus();
}
rpl::producer<bool> Widget::desiredShadowVisibility() const { rpl::producer<bool> Widget::desiredShadowVisibility() const {
return (_type == ::Settings::Main::Id() return (_type == ::Settings::Main::Id()
|| _type == ::Settings::Information::Id()) || _type == ::Settings::Information::Id())

View File

@ -66,6 +66,7 @@ public:
void saveChanges(FnMut<void()> done) override; void saveChanges(FnMut<void()> done) override;
void showFinished() override; void showFinished() override;
void setInnerFocus() override;
rpl::producer<bool> desiredShadowVisibility() const override; rpl::producer<bool> desiredShadowVisibility() const override;

View File

@ -84,6 +84,8 @@ public:
} }
virtual void showFinished() { virtual void showFinished() {
} }
virtual void setInnerFocus() {
}
[[nodiscard]] virtual QPointer<Ui::RpWidget> createPinnedToTop( [[nodiscard]] virtual QPointer<Ui::RpWidget> createPinnedToTop(
not_null<QWidget*> parent) { not_null<QWidget*> parent) {
return nullptr; return nullptr;