Some additional fixes to light theme support
Fixed some issues with light theme support: 1) Icons in content tree nodes (Folder icons) now use the foreground color. I did not find a case where the content tree is used for other icons. 2) The asset picker now uses the Background Normal color (instead of a very transparent dark gray) for the background, and Orange for the text. Did not seem like it warranted adding a new color, and Orange works in both dark and light styles. 3) The platform selector icons are now hard-coded instead of based on the style. This may sound odd, but the icons are colored, so they should always use White as the fully active color. Previously they worked with a dark theme because the Foreground was set to white. 4) Fixed the CollectionBackgroundColor in the light theme being dark gray instead of light gray like it should be. This fixes certain lists of things having a dark background in the light theme.
This commit is contained in:
@@ -86,6 +86,7 @@ namespace FlaxEditor.Content
|
||||
Folder.ParentFolder = parent.Folder;
|
||||
Parent = parent;
|
||||
}
|
||||
IconColor = Style.Current.Foreground;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -395,8 +395,8 @@ namespace FlaxEditor.GUI
|
||||
else
|
||||
{
|
||||
// No element selected
|
||||
Render2D.FillRectangle(iconRect, new Color(0.2f));
|
||||
Render2D.DrawText(style.FontMedium, "No asset\nselected", iconRect, Color.Wheat, TextAlignment.Center, TextAlignment.Center, TextWrapping.NoWrap, 1.0f, Height / DefaultIconSize);
|
||||
Render2D.FillRectangle(iconRect, Style.Current.BackgroundNormal);
|
||||
Render2D.DrawText(style.FontMedium, "No asset\nselected", iconRect, Color.Orange, TextAlignment.Center, TextAlignment.Center, TextWrapping.NoWrap, 1.0f, Height / DefaultIconSize);
|
||||
}
|
||||
|
||||
// Check if drag is over
|
||||
|
||||
@@ -100,9 +100,10 @@ namespace FlaxEditor.GUI
|
||||
AutoResize = true;
|
||||
Offsets = new Margin(0, 0, 0, IconSize);
|
||||
|
||||
_mouseOverColor = style.Foreground;
|
||||
_selectedColor = style.Foreground;
|
||||
_defaultColor = style.ForegroundGrey;
|
||||
// Ignoring style on purpose (style would make sense if the icons were white, but they are colored)
|
||||
_mouseOverColor = new Color(0.8f, 0.8f, 0.8f, 1f);
|
||||
_selectedColor = Color.White;
|
||||
_defaultColor = new Color(0.7f, 0.7f, 0.7f, 0.5f);
|
||||
|
||||
for (int i = 0; i < platforms.Length; i++)
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace FlaxEditor.Options
|
||||
BorderNormal = new Color(0.59f, 0.59f, 0.64f, 1f),
|
||||
TextBoxBackground = new Color(0.75f, 0.75f, 0.81f, 1f),
|
||||
TextBoxBackgroundSelected = new Color(0.73f, 0.73f, 0.80f, 1f),
|
||||
CollectionBackgroundColor = new Color(0.25f, 0.25f, 0.25f, 1f),
|
||||
CollectionBackgroundColor = new Color(0.85f, 0.85f, 0.88f, 1f),
|
||||
ProgressNormal = new Color(0.03f, 0.65f, 0.12f, 1f),
|
||||
|
||||
// Fonts
|
||||
|
||||
Reference in New Issue
Block a user