2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +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

@@ -207,7 +207,7 @@ int LayerWidget::resizeGetHeight(int newWidth) {
auto windowWidth = parentSize.width();
auto windowHeight = parentSize.height();
auto newLeft = (windowWidth - newWidth) / 2;
auto newTop = snap(
auto newTop = std::clamp(
windowHeight / 24,
st::infoLayerTopMinimal,
st::infoLayerTopMaximal);