mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 15:35:51 +00:00
Improved casting of limits for std::distance in stack linear chart view.
This commit is contained in:
@@ -401,7 +401,9 @@ void ChartWidget::Footer::moveCenter(
|
||||
void ChartWidget::Footer::moveSide(bool left, float64 x) {
|
||||
const auto w = float64(st::statisticsChartFooterSideWidth);
|
||||
const auto mid = float64(st::statisticsChartFooterBetweenSide);
|
||||
if (left) {
|
||||
if (_width < (2 * w + mid)) {
|
||||
return;
|
||||
} else if (left) {
|
||||
const auto min = std::clamp(x, 0., _rightSide.min - w - mid);
|
||||
_leftSide = Limits{ .min = min, .max = min + w };
|
||||
} else if (!left) {
|
||||
|
Reference in New Issue
Block a user