glare.h 724 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. namespace Ui {
  9. struct GlareEffect final {
  10. void validate(
  11. const QColor &color,
  12. Fn<void()> updateCallback,
  13. crl::time timeout,
  14. crl::time duration);
  15. [[nodiscard]] float64 progress(crl::time now) const;
  16. [[nodiscard]] QLinearGradient computeGradient(const QColor &color) const;
  17. Ui::Animations::Basic animation;
  18. struct {
  19. crl::time birthTime = 0;
  20. crl::time deathTime = 0;
  21. } glare;
  22. QPixmap pixmap;
  23. int width = 0;
  24. bool paused = false;
  25. };
  26. } // namespace Ui