2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 22:55:11 +00:00

Replaced snap util function with std::clamp.

This commit is contained in:
23rd
2021-01-23 06:29:50 +03:00
parent 4895e5e110
commit dd01ece14a
44 changed files with 193 additions and 92 deletions

View File

@@ -528,7 +528,7 @@ void ConfirmContactBox::prepare() {
_contact->initDimensions();
accumulate_max(maxWidth, _contact->maxWidth());
maxWidth += st::boxPadding.left() + st::boxPadding.right();
const auto width = snap(maxWidth, st::boxWidth, st::boxWideWidth);
const auto width = std::clamp(maxWidth, st::boxWidth, st::boxWideWidth);
const auto available = width
- st::boxPadding.left()
- st::boxPadding.right();