Added ability to finish animation of toggle in SettingsButton.
This commit is contained in:
parent
a5020ac5bc
commit
35cc61cb48
2 changed files with 9 additions and 0 deletions
|
|
@ -709,6 +709,13 @@ SettingsButton::SettingsButton(
|
||||||
|
|
||||||
SettingsButton::~SettingsButton() = default;
|
SettingsButton::~SettingsButton() = default;
|
||||||
|
|
||||||
|
void SettingsButton::finishAnimating() {
|
||||||
|
if (_toggle) {
|
||||||
|
_toggle->finishAnimating();
|
||||||
|
}
|
||||||
|
Ui::RippleButton::finishAnimating();
|
||||||
|
}
|
||||||
|
|
||||||
SettingsButton *SettingsButton::toggleOn(
|
SettingsButton *SettingsButton::toggleOn(
|
||||||
rpl::producer<bool> &&toggled,
|
rpl::producer<bool> &&toggled,
|
||||||
bool ignoreClick) {
|
bool ignoreClick) {
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,8 @@ public:
|
||||||
[[nodiscard]] const style::SettingsButton &st() const;
|
[[nodiscard]] const style::SettingsButton &st() const;
|
||||||
[[nodiscard]] int fullTextWidth() const;
|
[[nodiscard]] int fullTextWidth() const;
|
||||||
|
|
||||||
|
void finishAnimating();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int resizeGetHeight(int newWidth) override;
|
int resizeGetHeight(int newWidth) override;
|
||||||
void onStateChanged(
|
void onStateChanged(
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue