1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 15:27:54 +00:00

Suppress conversion warning

This fixes MSVC warning C4305: 'argument': truncation from 'double' to 'float'.
`QColor::setAlphaF()` parameter has been changed to `float` in Qt6.
This commit is contained in:
Chocobo1 2021-10-12 15:33:13 +08:00
parent dff39ffd20
commit 489d88e02a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -186,7 +186,7 @@ void PiecesBar::paintEvent(QPaintEvent *)
if (!m_highlightedRegion.isNull())
{
QColor highlightColor {this->palette().color(QPalette::Active, QPalette::Highlight)};
highlightColor.setAlphaF(0.35);
highlightColor.setAlphaF(0.35f);
QRect targetHighlightRect {m_highlightedRegion.adjusted(borderWidth, borderWidth, borderWidth, height() - 2 * borderWidth)};
painter.fillRect(targetHighlightRect, highlightColor);
}