2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-03 16:15:13 +00:00

Improve stories controls geometry constraints.

This commit is contained in:
John Preston
2023-05-18 14:04:14 +04:00
parent 00b4f77384
commit ae4d660c38
9 changed files with 60 additions and 23 deletions

View File

@@ -693,9 +693,14 @@ void FieldAutocomplete::recount(bool resetScroll) {
if (h > _boundings.height()) h = _boundings.height();
if (h > maxh) h = maxh;
if (width() != _boundings.width() || height() != h) {
setGeometry(_boundings.x(), _boundings.y() + _boundings.height() - h, _boundings.width(), h);
setGeometry(
_boundings.x(),
_boundings.y() + _boundings.height() - h,
_boundings.width(),
h);
_scroll->resize(_boundings.width(), h);
} else if (y() != _boundings.y() + _boundings.height() - h) {
} else if (x() != _boundings.x()
|| y() != _boundings.y() + _boundings.height() - h) {
move(_boundings.x(), _boundings.y() + _boundings.height() - h);
}
if (resetScroll) st = 0;