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);
}