2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Beta 10008004: games / webpages work fine if media autoload disabled.

Also moved alot of file icons from sprite to separate b&w files.
This commit is contained in:
John Preston
2016-09-29 22:42:14 +03:00
parent 1247bd19b6
commit a5eee9bd3e
28 changed files with 249 additions and 170 deletions

View File

@@ -233,7 +233,8 @@ void PhotoSendBox::paintEvent(QPaintEvent *e) {
p.drawEllipse(inner);
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
p.drawSpriteCenter(inner, st::msgFileInPlay);
auto icon = &st::msgFileInPlay;
icon->paintInCenter(p, inner);
}
} else {
int32 w = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right();
@@ -272,7 +273,8 @@ void PhotoSendBox::paintEvent(QPaintEvent *e) {
p.drawEllipse(inner);
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
p.drawSpriteCenter(inner, _isImage ? st::msgFileOutImage : st::msgFileOutFile);
auto icon = &(_isImage ? st::msgFileOutImage : st::msgFileOutDocument);
icon->paintInCenter(p, inner);
} else {
p.drawPixmapLeft(x + st::msgFilePadding.left(), y + st::msgFilePadding.top(), width(), userDefPhoto(1)->pixCircled(st::msgFileSize));
}
@@ -553,7 +555,8 @@ void EditCaptionBox::paintEvent(QPaintEvent *e) {
p.drawEllipse(inner);
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
p.drawSpriteCenter(inner, st::msgFileInPlay);
auto icon = &st::msgFileInPlay;
icon->paintInCenter(p, inner);
}
} else if (_doc) {
int32 w = width() - st::boxPhotoPadding.left() - st::boxPhotoPadding.right();
@@ -591,7 +594,8 @@ void EditCaptionBox::paintEvent(QPaintEvent *e) {
p.drawEllipse(inner);
p.setRenderHint(QPainter::HighQualityAntialiasing, false);
p.drawSpriteCenter(inner, _isImage ? st::msgFileInImage : st::msgFileInFile);
auto icon = &(_isImage ? st::msgFileInImage : st::msgFileInDocument);
icon->paintInCenter(p, inner);
}
p.setFont(st::semiboldFont);
p.setPen(st::black);