diff --git a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
index 2ae2e6ea5..424ff83ca 100644
--- a/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/CollectionEditor.cs
@@ -126,7 +126,7 @@ namespace FlaxEditor.CustomEditors.Editors
{
_readOnly = false;
NotNullItems = false;
- _background = new Color(1f, 1f, 1f, 0.08f);
+ _background = FlaxEngine.GUI.Style.Current.CollectionBackgroundColor;
}
else
{
diff --git a/Source/Editor/CustomEditors/Editors/DictionaryEditor.cs b/Source/Editor/CustomEditors/Editors/DictionaryEditor.cs
index 62a8459f7..99e84b225 100644
--- a/Source/Editor/CustomEditors/Editors/DictionaryEditor.cs
+++ b/Source/Editor/CustomEditors/Editors/DictionaryEditor.cs
@@ -1,5 +1,9 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
using FlaxEditor.CustomEditors.Elements;
using FlaxEditor.CustomEditors.GUI;
using FlaxEditor.GUI;
@@ -8,10 +12,6 @@ using FlaxEditor.Scripting;
using FlaxEngine;
using FlaxEngine.GUI;
using FlaxEngine.Json;
-using System;
-using System.Collections;
-using System.Collections.Generic;
-using System.Linq;
namespace FlaxEditor.CustomEditors.Editors
{
@@ -186,15 +186,13 @@ namespace FlaxEditor.CustomEditors.Editors
var collection = (CollectionAttribute)attributes.FirstOrDefault(x => x is CollectionAttribute);
if (collection is null)
{
- // TODO: handle ReadOnly and NotNullItems by filtering child editors SetValue
-
-
_readOnly = false;
_notNullItems = false;
- _background = new Color(1f, 1f, 1f, 0.08f);
+ _background = FlaxEngine.GUI.Style.Current.CollectionBackgroundColor;
}
else
{
+ // TODO: handle ReadOnly and NotNullItems by filtering child editors SetValue
_readOnly = collection.ReadOnly;
_notNullItems = collection.NotNullItems;
_background = collection.BackgroundColor;
diff --git a/Source/Editor/Options/OptionsModule.cs b/Source/Editor/Options/OptionsModule.cs
index ea42ee99b..a7f9a6dd0 100644
--- a/Source/Editor/Options/OptionsModule.cs
+++ b/Source/Editor/Options/OptionsModule.cs
@@ -232,6 +232,7 @@ namespace FlaxEditor.Options
BorderNormal = Color.FromBgra(0xFF54545C),
TextBoxBackground = Color.FromBgra(0xFF333337),
TextBoxBackgroundSelected = Color.FromBgra(0xFF3F3F46),
+ CollectionBackgroundColor = Color.FromBgra(0x16FFFFFF),
ProgressNormal = Color.FromBgra(0xFF0ad328),
// Fonts
diff --git a/Source/Engine/Scripting/Attributes/CollectionAttribute.cs b/Source/Engine/Scripting/Attributes/CollectionAttribute.cs
index 61beac368..7d854d582 100644
--- a/Source/Engine/Scripting/Attributes/CollectionAttribute.cs
+++ b/Source/Engine/Scripting/Attributes/CollectionAttribute.cs
@@ -1,6 +1,7 @@
// Copyright (c) 2012-2021 Wojciech Figat. All rights reserved.
using System;
+using FlaxEngine.GUI;
namespace FlaxEngine
{
@@ -36,8 +37,8 @@ namespace FlaxEngine
public float Spacing;
///
- /// Background color of the collection.
+ /// The collection background color.
///
- public Color BackgroundColor = new Color(1f, 1f, 1f, 0.08f);
+ public Color BackgroundColor = Style.Current.CollectionBackgroundColor;
}
}
diff --git a/Source/Engine/Scripting/Scripting.cs b/Source/Engine/Scripting/Scripting.cs
index ae7821526..baafffd56 100644
--- a/Source/Engine/Scripting/Scripting.cs
+++ b/Source/Engine/Scripting/Scripting.cs
@@ -221,6 +221,7 @@ namespace FlaxEngine
TextBoxBackground = Color.FromBgra(0xFF333337),
ProgressNormal = Color.FromBgra(0xFF0ad328),
TextBoxBackgroundSelected = Color.FromBgra(0xFF3F3F46),
+ CollectionBackgroundColor = Color.FromBgra(0x16FFFFFF),
SharedTooltip = new Tooltip(),
};
style.DragWindow = style.BackgroundSelected * 0.7f;
diff --git a/Source/Engine/UI/GUI/Style.cs b/Source/Engine/UI/GUI/Style.cs
index 9b4f0f64e..b6ca35f88 100644
--- a/Source/Engine/UI/GUI/Style.cs
+++ b/Source/Engine/UI/GUI/Style.cs
@@ -152,6 +152,11 @@ namespace FlaxEngine.GUI
[EditorOrder(190)]
public Color TextBoxBackgroundSelected;
+ ///
+ /// The collection background color.
+ ///
+ [EditorOrder(195)]
+ public Color CollectionBackgroundColor;
///
/// The progress normal color.
///