forked from qt-creator/qt-creator
QmlDesigner.propertyPane: bugifx
Image.PreserveAspectCrop not PreserveAspectCrop The scope is needed
This commit is contained in:
@@ -40,15 +40,15 @@ void ContextPaneWidgetImage::setProperties(QmlJS::PropertyReader *propertyReader
|
|||||||
|
|
||||||
ui->stretchRadioButton->setChecked(true);
|
ui->stretchRadioButton->setChecked(true);
|
||||||
|
|
||||||
if (fillMode == "Tile")
|
if (fillMode == "Image.Tile" || fillMode == "Tile")
|
||||||
ui->tileRadioButton->setChecked(true);
|
ui->tileRadioButton->setChecked(true);
|
||||||
if (fillMode == "TileVertically")
|
if (fillMode == "Image.TileVertically" || fillMode == "TileVertically")
|
||||||
ui->horizontalStretchRadioButton->setChecked(true);
|
ui->horizontalStretchRadioButton->setChecked(true);
|
||||||
if (fillMode == "TileHorizontally")
|
if (fillMode == "Image.TileHorizontally" || fillMode == "TileHorizontally")
|
||||||
ui->verticalStretchRadioButton->setChecked(true);
|
ui->verticalStretchRadioButton->setChecked(true);
|
||||||
if (fillMode == "PreserveAspectFit")
|
if (fillMode == "Image.PreserveAspectFit" || fillMode == "PreserveAspectFit")
|
||||||
ui->preserveAspectFitRadioButton->setChecked(true);
|
ui->preserveAspectFitRadioButton->setChecked(true);
|
||||||
if (fillMode == "PreserveAspectCrop")
|
if (fillMode == "Image.PreserveAspectCrop" || fillMode == "PreserveAspectCrop")
|
||||||
ui->cropAspectFitRadioButton->setChecked(true);
|
ui->cropAspectFitRadioButton->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
ui->stretchRadioButton->setChecked(true);
|
ui->stretchRadioButton->setChecked(true);
|
||||||
@@ -76,19 +76,19 @@ void ContextPaneWidgetImage::onStretchChanged()
|
|||||||
{
|
{
|
||||||
QString stretch;
|
QString stretch;
|
||||||
if (ui->stretchRadioButton->isChecked())
|
if (ui->stretchRadioButton->isChecked())
|
||||||
stretch = QLatin1String("Stretch");
|
stretch = QLatin1String("Image.Stretch");
|
||||||
else if (ui->tileRadioButton->isChecked())
|
else if (ui->tileRadioButton->isChecked())
|
||||||
stretch = QLatin1String("Tile");
|
stretch = QLatin1String("Image.Tile");
|
||||||
else if (ui->horizontalStretchRadioButton->isChecked())
|
else if (ui->horizontalStretchRadioButton->isChecked())
|
||||||
stretch = QLatin1String("TileVertically");
|
stretch = QLatin1String("Image.TileVertically");
|
||||||
else if (ui->verticalStretchRadioButton->isChecked())
|
else if (ui->verticalStretchRadioButton->isChecked())
|
||||||
stretch = QLatin1String("TileHorizontally");
|
stretch = QLatin1String("Image.TileHorizontally");
|
||||||
else if (ui->preserveAspectFitRadioButton->isChecked())
|
else if (ui->preserveAspectFitRadioButton->isChecked())
|
||||||
stretch = QLatin1String("PreserveAspectFit");
|
stretch = QLatin1String("Image.PreserveAspectFit");
|
||||||
else if (ui->cropAspectFitRadioButton->isChecked())
|
else if (ui->cropAspectFitRadioButton->isChecked())
|
||||||
stretch = QLatin1String("PreserveAspectCrop");
|
stretch = QLatin1String("Image.PreserveAspectCrop");
|
||||||
|
|
||||||
if (stretch == QLatin1String("Stretch"))
|
if (stretch == QLatin1String("Image.Stretch"))
|
||||||
emit removeProperty(QLatin1String("fillMode"));
|
emit removeProperty(QLatin1String("fillMode"));
|
||||||
else
|
else
|
||||||
emit propertyChanged(QLatin1String("fillMode"), stretch);
|
emit propertyChanged(QLatin1String("fillMode"), stretch);
|
||||||
|
|||||||
@@ -200,9 +200,6 @@ void ContextPaneWidgetRectangle::onGradientLineDoubleClicked(const QPoint &p)
|
|||||||
parentContextWidget->colorDialog()->setupColor(ui->gradientLine->activeColor());
|
parentContextWidget->colorDialog()->setupColor(ui->gradientLine->activeColor());
|
||||||
pos = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(pos);
|
pos = parentContextWidget->colorDialog()->parentWidget()->mapFromGlobal(pos);
|
||||||
parentContextWidget->onShowColorDialog(true, pos);
|
parentContextWidget->onShowColorDialog(true, pos);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ContextPaneWidgetRectangle::onUpdateGradient()
|
void ContextPaneWidgetRectangle::onUpdateGradient()
|
||||||
|
|||||||
Reference in New Issue
Block a user