info_profile_text.h 951 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "base/object_ptr.h"
  9. #include <rpl/producer.h>
  10. namespace style {
  11. struct FlatLabel;
  12. } // namespace style
  13. namespace Ui {
  14. class VerticalLayout;
  15. class FlatLabel;
  16. template <typename Widget>
  17. class SlideWrap;
  18. } // namespace Ui
  19. namespace Info {
  20. namespace Profile {
  21. struct TextWithLabel {
  22. object_ptr<Ui::SlideWrap<Ui::VerticalLayout>> wrap;
  23. not_null<Ui::FlatLabel*> text;
  24. not_null<Ui::FlatLabel*> subtext;
  25. };
  26. TextWithLabel CreateTextWithLabel(
  27. QWidget *parent,
  28. rpl::producer<TextWithEntities> &&label,
  29. rpl::producer<TextWithEntities> &&text,
  30. const style::FlatLabel &labelSt,
  31. const style::FlatLabel &textSt,
  32. const style::margins &padding);
  33. } // namespace Profile
  34. } // namespace Info