2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Improve screencast source choosing design.

This commit is contained in:
John Preston
2021-04-29 20:28:12 +04:00
parent 022c0a1327
commit a48649987e
12 changed files with 304 additions and 74 deletions

View File

@@ -93,16 +93,6 @@ QImage FromInlineBytes(const QByteArray &bytes) {
return App::readImage(ExpandInlineBytes(bytes));
}
QSize GetSizeForDocument(const QVector<MTPDocumentAttribute> &attributes) {
for (const auto &attribute : attributes) {
if (attribute.type() == mtpc_documentAttributeImageSize) {
auto &size = attribute.c_documentAttributeImageSize();
return QSize(size.vw().v, size.vh().v);
}
}
return QSize();
}
} // namespace Images
Image::Image(const QString &path) : Image(ReadContent(path)) {