grouped_layout.h 642 B

12345678910111213141516171819202122232425262728
  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/rect_part.h"
  9. namespace Ui {
  10. struct GroupMediaLayout {
  11. QRect geometry;
  12. RectParts sides = RectPart::None;
  13. };
  14. std::vector<GroupMediaLayout> LayoutMediaGroup(
  15. const std::vector<QSize> &sizes,
  16. int maxWidth,
  17. int minWidth,
  18. int spacing);
  19. RectParts GetCornersFromSides(RectParts sides);
  20. QSize GetImageScaleSizeForGeometry(QSize original, QSize geometry);
  21. } // namespace Ui