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
@@ -403,7 +403,7 @@ not_null<Ui::RpWidget*> AddInnerToggle(
(s.height() - label->height()) / 2);
arrow->moveToLeft(
std::min(
labelLeft + label->naturalWidth(),
labelLeft + label->textMaxWidth(),
labelRight - arrow->width()),
(s.height() - arrow->height()) / 2);
}, button->lifetime());