Fix resource registration for the EntityOutlinerWidget class in AzToolsFramework. Also moves icons to a more appropriate location. (#1731)

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-07-01 18:37:44 -07:00
committed by GitHub
parent b331eea9ca
commit 02f340abbd
23 changed files with 60 additions and 57 deletions
@@ -87,24 +87,24 @@ AzToolsFramework--EntityOutlinerCheckBox#VisibilityMixed::indicator:checked
AzToolsFramework--EntityOutlinerCheckBox#Visibility::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityMixed::indicator:checked
{
image: url(:/visibility_default.svg);
image: url(:/Outliner/visibility_default.svg);
}
AzToolsFramework--EntityOutlinerCheckBox#Visibility::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityMixed::indicator:unchecked
{
image: url(:/visibility_on.svg);
image: url(:/Outliner/visibility_on.svg);
margin-top: 3px;
}
AzToolsFramework--EntityOutlinerCheckBox#VisibilityOverridden::indicator:checked
{
image: url(:/visibility_default_transparent.svg);
image: url(:/Outliner/visibility_default_transparent.svg);
}
AzToolsFramework--EntityOutlinerCheckBox#VisibilityOverridden::indicator:unchecked
{
image: url(:/visibility_on_transparent.svg);
image: url(:/Outliner/visibility_on_transparent.svg);
margin-top: 3px;
}
@@ -112,7 +112,7 @@ AzToolsFramework--EntityOutlinerCheckBox#VisibilityHover::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityMixedHover::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityOverriddenHover::indicator:checked
{
image: url(:/visibility_default_hover.svg);
image: url(:/Outliner/visibility_default_hover.svg);
margin-top: 3px;
}
@@ -120,7 +120,7 @@ AzToolsFramework--EntityOutlinerCheckBox#VisibilityHover::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityMixedHover::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#VisibilityOverriddenHover::indicator:unchecked
{
image: url(:/visibility_on_hover.svg);
image: url(:/Outliner/visibility_on_hover.svg);
margin-top: 3px;
}
@@ -130,24 +130,24 @@ AzToolsFramework--EntityOutlinerCheckBox#VisibilityHover::indicator:unchecked
AzToolsFramework--EntityOutlinerCheckBox#Lock::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#LockMixed::indicator:checked
{
image: url(:/lock_on.svg);
image: url(:/Outliner/lock_on.svg);
margin-top: 1px;
}
AzToolsFramework--EntityOutlinerCheckBox#Lock::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#LockMixed::indicator:unchecked
{
image: url(:/lock_default.svg);
image: url(:/Outliner/lock_default.svg);
}
AzToolsFramework--EntityOutlinerCheckBox#LockOverridden::indicator:checked
{
image: url(:/lock_on_transparent.svg);
image: url(:/Outliner/lock_on_transparent.svg);
}
AzToolsFramework--EntityOutlinerCheckBox#LockOverridden::indicator:unchecked
{
image: url(:/lock_default_transparent.svg);
image: url(:/Outliner/lock_default_transparent.svg);
margin-top: 1px;
}
@@ -155,7 +155,7 @@ AzToolsFramework--EntityOutlinerCheckBox#LockHover::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#LockMixedHover::indicator:checked
, AzToolsFramework--EntityOutlinerCheckBox#LockOverriddenHover::indicator:checked
{
image: url(:/lock_on_hover.svg);
image: url(:/Outliner/lock_on_hover.svg);
margin-top: 1px;
}
@@ -163,6 +163,6 @@ AzToolsFramework--EntityOutlinerCheckBox#LockHover::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#LockMixedHover::indicator:unchecked
, AzToolsFramework--EntityOutlinerCheckBox#LockOverriddenHover::indicator:unchecked
{
image: url(:/lock_default_hover.svg);
image: url(:/Outliner/lock_default_hover.svg);
margin-top: 1px;
}
@@ -17,15 +17,15 @@ namespace AzToolsFramework
DisplayOptionsMenu::DisplayOptionsMenu(QWidget* parent)
: QMenu(parent)
{
auto sortManually = addAction(QIcon(QStringLiteral(":/sort_manually.svg")), tr("Sort: Manually"));
auto sortManually = addAction(QIcon(QStringLiteral(":/Outliner/sort_manually.svg")), tr("Sort: Manually"));
sortManually->setData(static_cast<int>(DisplaySortMode::Manually));
sortManually->setCheckable(true);
auto sortAtoZ = addAction(QIcon(QStringLiteral(":/sort_a_to_z.svg")), tr("Sort: A to Z"));
auto sortAtoZ = addAction(QIcon(QStringLiteral(":/Outliner/sort_a_to_z.svg")), tr("Sort: A to Z"));
sortAtoZ->setData(static_cast<int>(DisplaySortMode::AtoZ));
sortAtoZ->setCheckable(true);
auto sortZtoA = addAction(QIcon(QStringLiteral(":/sort_z_to_a.svg")), tr("Sort: Z to A"));
auto sortZtoA = addAction(QIcon(QStringLiteral(":/Outliner/sort_z_to_a.svg")), tr("Sort: Z to A"));
sortZtoA->setData(static_cast<int>(DisplaySortMode::ZtoA));
sortZtoA->setCheckable(true);
@@ -48,6 +48,12 @@
#include <AzToolsFramework/UI/Outliner/ui_EntityOutlinerWidget.h>
// This has to live outside of any namespaces due to issues on Linux with calls to Q_INIT_RESOURCE if they are inside a namespace
void initEntityOutlinerWidgetResources()
{
Q_INIT_RESOURCE(resources);
}
namespace
{
const int queuedChangeDelay = 16; // milliseconds
@@ -143,6 +149,8 @@ namespace AzToolsFramework
, m_sortContentQueued(false)
, m_dropOperationInProgress(false)
{
initEntityOutlinerWidgetResources();
m_gui = new Ui::EntityOutlinerWidgetUI();
m_gui->setupUi(this);