|
|
|
@ -306,11 +306,8 @@ namespace AzToolsFramework
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Only show the close icon if the prefab is expanded.
|
|
|
|
// Only show the close icon if the prefab is expanded.
|
|
|
|
// This allows the prefab container to be opened if it was collapsed during propagation.
|
|
|
|
// This allows the prefab container to be opened if it was collapsed during propagation.
|
|
|
|
if (!isExpanded)
|
|
|
|
if (isExpanded)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Use the same color as the background.
|
|
|
|
// Use the same color as the background.
|
|
|
|
QColor backgroundColor = m_backgroundColor;
|
|
|
|
QColor backgroundColor = m_backgroundColor;
|
|
|
|
if (isSelected)
|
|
|
|
if (isSelected)
|
|
|
|
@ -331,17 +328,16 @@ namespace AzToolsFramework
|
|
|
|
QIcon closeIcon = QIcon(m_prefabEditCloseIconPath);
|
|
|
|
QIcon closeIcon = QIcon(m_prefabEditCloseIconPath);
|
|
|
|
painter->drawPixmap(option.rect.topLeft() + offset, closeIcon.pixmap(iconSize));
|
|
|
|
painter->drawPixmap(option.rect.topLeft() + offset, closeIcon.pixmap(iconSize));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
else
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// Only show the edit icon on hover.
|
|
|
|
// Only show the edit icon on hover.
|
|
|
|
if (!isHovered)
|
|
|
|
if (isHovered)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QIcon openIcon = QIcon(m_prefabEditOpenIconPath);
|
|
|
|
QIcon openIcon = QIcon(m_prefabEditOpenIconPath);
|
|
|
|
painter->drawPixmap(option.rect.topLeft() + offset, openIcon.pixmap(iconSize));
|
|
|
|
painter->drawPixmap(option.rect.topLeft() + offset, openIcon.pixmap(iconSize));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
painter->restore();
|
|
|
|
painter->restore();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|