mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 14:45:14 +00:00
Improve stories controls geometry constraints.
This commit is contained in:
@@ -172,6 +172,8 @@ ComposeControls {
|
||||
emoji: EmojiButton;
|
||||
suggestions: EmojiSuggestions;
|
||||
tabbed: EmojiPan;
|
||||
tabbedHeightMin: pixels;
|
||||
tabbedHeightMax: pixels;
|
||||
record: RecordBar;
|
||||
}
|
||||
|
||||
@@ -982,5 +984,7 @@ defaultComposeControls: ComposeControls {
|
||||
emoji: historyAttachEmoji;
|
||||
suggestions: defaultEmojiSuggestions;
|
||||
tabbed: defaultEmojiPan;
|
||||
tabbedHeightMin: emojiPanMinHeight;
|
||||
tabbedHeightMax: emojiPanMaxHeight;
|
||||
record: defaultRecordBar;
|
||||
}
|
||||
|
@@ -866,6 +866,7 @@ void SuggestionsController::showWithQuery(SuggestionsQuery query) {
|
||||
const auto force = base::take(_keywordsRefreshed);
|
||||
_lastShownQuery = query;
|
||||
_suggestions->showWithQuery(_lastShownQuery, force);
|
||||
_container->resizeToContent();
|
||||
}
|
||||
|
||||
SuggestionsQuery SuggestionsController::getEmojiQuery() {
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user