Skip to content
Snippets Groups Projects
Commit 57c96ee3 authored by Thomas Hartmann's avatar Thomas Hartmann
Browse files

QmlDesigner.propertyPane: use current color for gradient

parent c6208641
No related branches found
No related tags found
No related merge requests found
...@@ -153,9 +153,13 @@ void ContextPaneWidgetRectangle::onGradientClicked() ...@@ -153,9 +153,13 @@ void ContextPaneWidgetRectangle::onGradientClicked()
{ {
if (ui->colorGradient->isChecked()) { if (ui->colorGradient->isChecked()) {
m_hasGradient = true; m_hasGradient = true;
emit removeAndChangeProperty("color", "gradient", " Gradient { }", false); QLinearGradient gradient;
ui->gradientLine->setEnabled(true); QGradientStops stops;
ui->gradientLabel->setEnabled(true); 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);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment