change Toggle behavior

This commit is contained in:
kirillpt 2020-11-26 23:45:44 +03:00
parent 633fd31edc
commit 5a3905b337
3 changed files with 18 additions and 16 deletions

View file

@ -22,6 +22,7 @@ Toggle::Toggle(QWidget *parent)
void
Toggle::setState(bool isEnabled)
{
setChecked(isEnabled);
thumb_->setShift(isEnabled ? Position::Left : Position::Right);
setupProperties();
}