Fix volume slider in voice chats.

This commit is contained in:
John Preston 2021-06-23 20:14:22 +04:00
parent 468e75a572
commit 90ff8ecd0f
1 changed files with 8 additions and 1 deletions

View File

@ -260,7 +260,14 @@ void MediaSlider::paintEvent(QPaintEvent *e) {
: seekRect.height();
const auto from = 0;
const auto length = (horizontal ? width() : height());
const auto mid = qRound(from + value * length);
const auto alwaysSeekSize = horizontal
? _st.seekSize.width()
: _st.seekSize.height();
const auto mid = _alwaysDisplayMarker
? qRound(from
+ (alwaysSeekSize / 2.)
+ value * (length - alwaysSeekSize))
: qRound(from + value * length);
const auto till = std::max(mid, qRound(from + receivedTill * length));
const auto end = from + length;
const auto activeFg = disabled