forked from qt-creator/qt-creator
QmlDesigner.propertyEditor: code cleanup for property editing
Instead of duplicating the code from QmlEditorWigets we now subclass and expose the gradient editing to qml. The adaptor class is called GradientLineQmlAdaptor.
This commit is contained in:
@@ -49,7 +49,7 @@ void GradientLine::setGradient(const QLinearGradient &gradient)
|
||||
{
|
||||
m_gradient = gradient;
|
||||
m_useGradient = true;
|
||||
setupGradient();
|
||||
readGradient();
|
||||
emit gradientChanged();
|
||||
|
||||
}
|
||||
@@ -105,7 +105,7 @@ void GradientLine::setActiveColor(const QColor &newColor)
|
||||
update();
|
||||
}
|
||||
|
||||
void GradientLine::setupGradient()
|
||||
void GradientLine::readGradient()
|
||||
{
|
||||
if (m_useGradient) {
|
||||
m_colorList.clear();
|
||||
|
||||
Reference in New Issue
Block a user