info_userpic_emoji_builder_layer.h 811 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. #include "ui/cached_round_corners.h"
  10. namespace Ui {
  11. class RpWidget;
  12. } // namespace Ui
  13. namespace UserpicBuilder {
  14. class LayerWidget : public Ui::LayerWidget {
  15. public:
  16. LayerWidget();
  17. void setContent(not_null<Ui::RpWidget*> content);
  18. void parentResized() override;
  19. bool closeByOutsideClick() const override;
  20. protected:
  21. int resizeGetHeight(int newWidth) override;
  22. void paintEvent(QPaintEvent *e) override;
  23. private:
  24. const Ui::CornersPixmaps _corners;
  25. Ui::RpWidget *_content;
  26. };
  27. } // namespace UserpicBuilder