mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Fixed height of thumb in EditCaptionBox when media changes to photo.
This commit is contained in:
@@ -440,13 +440,16 @@ void EditCaptionBox::updateEditPreview() {
|
||||
_doc = true;
|
||||
}
|
||||
|
||||
_wayWrap->toggle(_photo && !_isAlbum, anim::type::instant);
|
||||
const auto showCheckbox = _photo && !_isAlbum;
|
||||
_wayWrap->toggle(showCheckbox, anim::type::instant);
|
||||
|
||||
if (!_doc) {
|
||||
_thumb = App::pixmapFromImageInPlace(
|
||||
file->preview.scaled(
|
||||
st::sendMediaPreviewSize * cIntRetinaFactor(),
|
||||
st::confirmMaxHeight * cIntRetinaFactor(),
|
||||
(st::confirmMaxHeight - (showCheckbox
|
||||
? st::confirmMaxHeightSkip
|
||||
: 0)) * cIntRetinaFactor(),
|
||||
Qt::KeepAspectRatio));
|
||||
_thumbw = _thumb.width() / cIntRetinaFactor();
|
||||
_thumbh = _thumb.height() / cIntRetinaFactor();
|
||||
|
Reference in New Issue
Block a user