Sync color between environment map and 3D Editor background

Task-number: QDS-7097
Change-Id: I5f2c83bc43bd589d0d1f32e01e7512ab20a03bcf
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Samuel Ghinet
2022-06-20 16:06:28 +03:00
parent c1d75d8df7
commit 86f93b8949
10 changed files with 128 additions and 10 deletions

View File

@@ -338,6 +338,21 @@ Edit3DAction *Edit3DView::createResetColorAction()
tooltip);
}
Edit3DAction *Edit3DView::createSyncBackgroundColorAction()
{
QString description = QCoreApplication::translate("SyncEdit3DColorAction",
"Use Scene Environment Color");
QString tooltip = QCoreApplication::translate("SyncEdit3DColorAction",
"Sets the 3D Editor to use the Scene Environment "
"color as background color.");
return new Edit3DAction(
QmlDesigner::Constants::EDIT3D_EDIT_SYNC_BACKGROUND_COLOR, View3DActionCommand::SyncBackgroundColor,
description,
{}, true, false, {}, {}, {},
tooltip);
}
void Edit3DView::createEdit3DActions()
{
m_selectionModeAction
@@ -569,6 +584,7 @@ void Edit3DView::createEdit3DActions()
m_backgroundColorActions << createSelectBackgrounColorAction();
m_backgroundColorActions << createGridColorSelectionAction();
m_backgroundColorActions << createSyncBackgroundColorAction();
m_backgroundColorActions << createResetColorAction();
}