mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-03-25 04:38:23 +00:00
Fixed minimal height of image thumbnail in EditCaptionBox.
This commit is contained in:
parent
d5b9effd2e
commit
f57ef43dc7
@ -614,6 +614,19 @@ void EditCaptionBox::resizeEvent(QResizeEvent *e) {
|
||||
BoxContent::resizeEvent(e);
|
||||
|
||||
auto bottom = height();
|
||||
{
|
||||
const auto resultScrollHeight = bottom
|
||||
- _field->height()
|
||||
- st::boxPhotoCaptionSkip
|
||||
- (_controls->isHidden() ? 0 : _controls->heightNoMargins())
|
||||
- st::boxPhotoPadding.top();
|
||||
const auto minThumbH = st::sendBoxAlbumGroupSize.height()
|
||||
+ st::sendBoxAlbumGroupSkipTop * 2;
|
||||
const auto diff = resultScrollHeight - minThumbH;
|
||||
if (diff < 0) {
|
||||
bottom -= diff;
|
||||
}
|
||||
}
|
||||
|
||||
_field->resize(st::sendMediaPreviewSize, _field->height());
|
||||
_field->moveToLeft(
|
||||
|
Loading…
Reference in New Issue
Block a user