tdesktop/Telegram/SourceFiles/ui/grouped_layout.h

29 lines
642 B
C
Raw Normal View History

2017-12-13 18:10:48 +00:00
/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
2017-12-13 18:10:48 +00:00
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
2017-12-13 18:10:48 +00:00
*/
#pragma once
2019-09-13 12:22:54 +00:00
#include "ui/rect_part.h"
2017-12-19 16:57:42 +00:00
namespace Ui {
2017-12-13 18:10:48 +00:00
struct GroupMediaLayout {
QRect geometry;
RectParts sides = RectPart::None;
};
std::vector<GroupMediaLayout> LayoutMediaGroup(
const std::vector<QSize> &sizes,
int maxWidth,
int minWidth,
int spacing);
2017-12-19 16:57:42 +00:00
RectParts GetCornersFromSides(RectParts sides);
QSize GetImageScaleSizeForGeometry(QSize original, QSize geometry);
} // namespace Ui