示例#1
0
	void RuneItem::colorCenterPart(bool isCenterSpell)
	{
		QColor c;
		if (isCenterSpell)
			c = colorCenter();
		else
			c = Qt::GlobalColor::transparent;

		this->setBrush((QBrush(c)));
	}
示例#2
0
        QBrush getPreloaderBrush()
        {
            QLinearGradient grad(0, 0, 0.5, 0);
            grad.setCoordinateMode(QGradient::StretchToDeviceMode);
            grad.setSpread(QGradient::ReflectSpread);

            QColor colorEdge(ql1s("#000000"));
            colorEdge.setAlphaF(0.07);
            grad.setColorAt(0, colorEdge);

            QColor colorCenter(ql1s("#000000"));
            colorCenter.setAlphaF(0.12);
            grad.setColorAt(0.5, colorCenter);

            grad.setColorAt(1, colorEdge);

            QBrush result(grad);
            result.setColor(Qt::transparent);

            return result;
        }