mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Replaced snap util function with std::clamp.
This commit is contained in:
@@ -151,7 +151,7 @@ void TabbedPanel::updateContentHeight() {
|
||||
auto marginsHeight = _selector->marginTop() + _selector->marginBottom();
|
||||
auto availableHeight = _bottom - marginsHeight;
|
||||
auto wantedContentHeight = qRound(_heightRatio * availableHeight) - addedHeight;
|
||||
auto contentHeight = marginsHeight + snap(
|
||||
auto contentHeight = marginsHeight + std::clamp(
|
||||
wantedContentHeight,
|
||||
_minContentHeight,
|
||||
_maxContentHeight);
|
||||
|
Reference in New Issue
Block a user