2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-02 23:55:12 +00:00

Use FlatLabel::textMaxWidth.

This commit is contained in:
John Preston
2023-08-17 13:54:53 +02:00
parent 4b0c4eee30
commit 311691a3bc
10 changed files with 19 additions and 22 deletions

View File

@@ -2818,12 +2818,9 @@ void InnerWidget::resizeEmptyLabel() {
if (!_empty) {
return;
}
const auto useWidth = std::min(
_empty->naturalWidth(),
width() - 2 * st::dialogsEmptySkip);
const auto left = (width() - useWidth) / 2;
_empty->resizeToWidth(useWidth);
_empty->move(left, (st::dialogsEmptyHeight - _empty->height()) / 2);
const auto skip = st::dialogsEmptySkip;
_empty->resizeToWidth(width() - 2 * skip);
_empty->move(skip, (st::dialogsEmptyHeight - _empty->height()) / 2);
}
void InnerWidget::clearMouseSelection(bool clearSelection) {