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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user