| 178 | } |
| 179 | |
| 180 | void ToastNotification::updateTargetPosition(const QPoint& target) { |
| 181 | if (slide_animation_->state() == QAbstractAnimation::Running && !is_closing_) { |
| 182 | // Re-aim the in-flight animation from the current position. |
| 183 | slide_animation_->stop(); |
| 184 | slide_animation_->setStartValue(pos()); |
| 185 | slide_animation_->setEndValue(target); |
| 186 | slide_animation_->start(); |
| 187 | } else if (!is_closing_) { |
| 188 | move(target); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | void ToastNotification::onCloseClicked() { |
| 193 | hideAnimated(); |
no test coverage detected