Commit 57c96ee3 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyPane: use current color for gradient

parent c6208641
......@@ -153,9 +153,13 @@ void ContextPaneWidgetRectangle::onGradientClicked()
{
if (ui->colorGradient->isChecked()) {
m_hasGradient = true;
emit removeAndChangeProperty("color", "gradient", " Gradient { }", false);
ui->gradientLine->setEnabled(true);
ui->gradientLabel->setEnabled(true);
QLinearGradient gradient;
QGradientStops stops;
QColor color = ui->colorColorButton->convertedColor();
stops.append(QGradientStop(0, ui->colorColorButton->convertedColor()));
stops.append(QGradientStop(1, Qt::white));
gradient.setStops(stops);
ui->gradientLine->setGradient(gradient);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment