Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 515698
Collapse All | Expand All

(-)a/zlibrary/ui/src/qt4/tree/QtWaitingSpinner.cpp (-2 / +2 lines)
Lines 86-92 void QtWaitingSpinner::setRadius(int radius) { Link Here
86
}
86
}
87
87
88
void QtWaitingSpinner::setRoundness(qreal roundness) {
88
void QtWaitingSpinner::setRoundness(qreal roundness) {
89
	myRoundness = std::max(0.0, std::min(100.0, roundness));
89
	myRoundness = std::max(static_cast<qreal>(0.0), std::min(static_cast<qreal>(100.0), roundness));
90
}
90
}
91
91
92
void QtWaitingSpinner::setColor(QColor color) {
92
void QtWaitingSpinner::setColor(QColor color) {
Lines 148-154 QColor QtWaitingSpinner::countTrailColor(int distance, int lines, int trail, int Link Here
148
	qreal alphaDiff = color.alphaF() - (qreal)minAlphaF;
148
	qreal alphaDiff = color.alphaF() - (qreal)minAlphaF;
149
	qreal gradation = alphaDiff / (qreal)(distanceThreshold + 1);
149
	qreal gradation = alphaDiff / (qreal)(distanceThreshold + 1);
150
	qreal resultAlpha = color.alphaF() - gradation * distance;
150
	qreal resultAlpha = color.alphaF() - gradation * distance;
151
	resultAlpha = std::min(1.0, std::max(0.0, resultAlpha)); //if alpha is out of bound, force it to bounds
151
	resultAlpha = std::min(static_cast<qreal>(1.0), std::max(static_cast<qreal>(0.0), resultAlpha)); //if alpha is out of bound, force it to bounds
152
	color.setAlphaF(resultAlpha);
152
	color.setAlphaF(resultAlpha);
153
	return color;
153
	return color;
154
}
154
}

Return to bug 515698