[libcalamaresui] Fix build for ::ceil

This commit is contained in:
Adriaan de Groot 2022-04-20 10:07:56 +02:00
parent 87ff7ae0da
commit 7db14cb5cf

View File

@ -30,6 +30,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "waitingspinnerwidget.h"
#include <qmath.h>
#include <QPainter>
#include <QTimer>
@ -58,7 +59,7 @@ currentLineColor( int countDistance, int totalNrOfLines, qreal trailFadePerc, qr
return color;
}
const qreal minAlphaF = minOpacity / 100.0;
int distanceThreshold = static_cast< int >( ceil( ( totalNrOfLines - 1 ) * trailFadePerc / 100.0 ) );
int distanceThreshold = static_cast< int >( qCeil( ( totalNrOfLines - 1 ) * trailFadePerc / 100.0 ) );
if ( countDistance > distanceThreshold )
{
color.setAlphaF( minAlphaF );