Verified Commit eaf6b883 authored by ivan tkachenko's avatar ivan tkachenko
Browse files

PanelView: Replace qBound with std::clamp

These two code paths for vertical and horizontal orientations used two
different functions to clamp values. This commit makes them consistent.

Amends a3943400.
parent e5692c82
......@@ -621,7 +621,7 @@ void PanelView::resizePanel()
const int maxSize = qMin(m_maxLength, m_screenToFollow->size().height() - m_offset);
targetMinSize = QSize(totalThickness(), minSize);
targetMaxSize = QSize(totalThickness(), maxSize);
targetSize = QSize(totalThickness(), qBound(minSize, m_contentLength, maxSize));
targetSize = QSize(totalThickness(), std::clamp(m_contentLength, minSize, maxSize));
} else {
const int minSize = qMax(MINSIZE, m_minLength);
const int maxSize = qMin(m_maxLength, m_screenToFollow->size().width() - m_offset);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment