QmlDesigner: Make form editor color permanent

Make the form editor color permanent via AuxiliaryDataType::Document
instead of AuxiliaryDataType::Temporary. Also put it into the globally
available AuxiliaryDataProperties.

Task-number: QDS-12245
Change-Id: Ib9191f168bdbfdb09367afaeb8052d6fdbf7dad9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
(cherry picked from commit 994f3827b3)
This commit is contained in:
Henning Gruendl
2024-06-05 18:42:37 +02:00
committed by Thomas Hartmann
parent edc644ba82
commit 1d04511e6f
2 changed files with 2 additions and 5 deletions

View File

@@ -324,11 +324,6 @@ void FormEditorWidget::changeRootItemHeight(const QString &heighText)
}
}
namespace {
constexpr AuxiliaryDataKeyView formeditorColorProperty{AuxiliaryDataType::Temporary,
"formeditorColor"};
}
void FormEditorWidget::changeBackgound(const QColor &color)
{
if (color.alpha() == 0) {

View File

@@ -115,6 +115,8 @@ inline constexpr AuxiliaryDataKeyView bakeLightsManualProperty{AuxiliaryDataType
"bakeLightsManual"};
inline constexpr AuxiliaryDataKeyView contextImageProperty{AuxiliaryDataType::Temporary,
"contextImage"};
inline constexpr AuxiliaryDataKeyView formeditorColorProperty{AuxiliaryDataType::Document,
"formeditorColor"};
// Most material preview aux properties are duplicated as document and instance types, as they
// are both required to be persistent and used at runtime to control material preview rendering