settings_intro.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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. #include "ui/layers/layer_widget.h"
  9. namespace Ui {
  10. class VerticalLayout;
  11. class FadeShadow;
  12. class FlatLabel;
  13. template <typename Widget>
  14. class FadeWrap;
  15. } // namespace Ui
  16. namespace Window {
  17. class Controller;
  18. } // namespace Window
  19. namespace Settings {
  20. class IntroWidget;
  21. class LayerWidget : public Ui::LayerWidget {
  22. public:
  23. LayerWidget(QWidget*, not_null<Window::Controller*> window);
  24. void showFinished() override;
  25. void parentResized() override;
  26. static int MinimalSupportedWidth();
  27. protected:
  28. int resizeGetHeight(int newWidth) override;
  29. void doSetInnerFocus() override;
  30. void paintEvent(QPaintEvent *e) override;
  31. private:
  32. void setupHeightConsumers();
  33. object_ptr<IntroWidget> _content;
  34. int _desiredHeight = 0;
  35. bool _inResize = false;
  36. bool _tillTop = false;
  37. bool _tillBottom = false;
  38. };
  39. } // namespace Settings