mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-23 13:51:12 -05:00
Fix RSElidedItemDelegate abs to use std one.
This commit is contained in:
parent
d8ca92da1b
commit
ba7a4db934
@ -162,7 +162,7 @@ void RSElidedItemDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
int duration = 3;// Time (s) to make a revolution.
|
||||
auto time = (s%duration)*1000 + ms;
|
||||
qreal angle = 360.0*(time/(duration*1000.0));
|
||||
qreal add = 120*(time/(duration*1000.0))*abs(sin(qDegreesToRadians(angle/2)));
|
||||
qreal add = 120*(time/(duration*1000.0))*std::abs(sin(qDegreesToRadians(angle/2)));
|
||||
painter->setPen(QPen(QBrush(ownOption.palette.color(QPalette::Normal, QPalette::WindowText)),diag/10,Qt::DotLine,Qt::RoundCap));
|
||||
painter->drawEllipse( iconRect.x()+iconRect.width() /2 + (diag/4)*cos(qDegreesToRadians(angle ))
|
||||
, iconRect.y()+iconRect.height()/2 + (diag/4)*sin(qDegreesToRadians(angle )), 1, 1);
|
||||
|
Loading…
Reference in New Issue
Block a user