2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 14:38:15 +00:00

Closed beta 10019010: unified attach button, new intro, new stickers.

Now all files sending is confirmed before preparing for sending.
You can paste from clipboard and drag many files at once.
This commit is contained in:
John Preston
2016-11-28 18:45:07 +03:00
parent 26c08236cd
commit 3cff50009c
92 changed files with 1702 additions and 1588 deletions

View File

@@ -240,9 +240,9 @@ void Photo::paint(Painter &p, const QRect &clip, TextSelection selection, const
int32 size = _width * cIntRetinaFactor();
if (_goodLoaded || _data->thumb->loaded()) {
QImage img = (_data->loaded() ? _data->full : (_data->medium->loaded() ? _data->medium : _data->thumb))->pix().toImage();
auto img = (_data->loaded() ? _data->full : (_data->medium->loaded() ? _data->medium : _data->thumb))->pix().toImage();
if (!_goodLoaded) {
img = imageBlur(img);
img = Images::prepareBlur(img);
}
if (img.width() == img.height()) {
if (img.width() != size) {
@@ -337,7 +337,7 @@ void Video::paint(Painter &p, const QRect &clip, TextSelection selection, const
if (_thumbLoaded && !_data->thumb->isNull()) {
int32 size = _width * cIntRetinaFactor();
QImage img = imageBlur(_data->thumb->pix().toImage());
auto img = Images::prepareBlur(_data->thumb->pix().toImage());
if (img.width() == img.height()) {
if (img.width() != size) {
img = img.scaled(size, size, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
@@ -797,8 +797,8 @@ void Document::paint(Painter &p, const QRect &clip, TextSelection selection, con
if (_data->thumb->loaded()) {
if (_thumb.isNull() || loaded != _thumbForLoaded) {
_thumbForLoaded = loaded;
auto options = ImagePixOption::Smooth | ImagePixOption::None;
if (!_thumbForLoaded) options |= ImagePixOption::Blurred;
auto options = Images::Option::Smooth | Images::Option::None;
if (!_thumbForLoaded) options |= Images::Option::Blurred;
_thumb = _data->thumb->pixNoCache(_thumbw * cIntRetinaFactor(), 0, options, _st.fileThumbSize, _st.fileThumbSize);
}
p.drawPixmap(rthumb.topLeft(), _thumb);