Gered
10e057953e
Contains changes from "gwen-dotnet" removing dependancies on Windows, which ultimately means certain features (e.g. file load/save dialogs) do not work. Those classes still exist, but the code has been commented out.
51 lines
1.3 KiB
C#
51 lines
1.3 KiB
C#
using System;
|
|
using Gwen.Control;
|
|
|
|
namespace Gwen.ControlInternal
|
|
{
|
|
/// <summary>
|
|
/// Label for PropertyRow.
|
|
/// </summary>
|
|
public class PropertyRowLabel : Label
|
|
{
|
|
private readonly PropertyRow m_PropertyRow;
|
|
|
|
/// <summary>
|
|
/// Initializes a new instance of the <see cref="PropertyRowLabel"/> class.
|
|
/// </summary>
|
|
/// <param name="parent">Parent control.</param>
|
|
public PropertyRowLabel(PropertyRow parent)
|
|
: base(parent)
|
|
{
|
|
Alignment = Pos.Left | Pos.CenterV;
|
|
m_PropertyRow = parent;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Updates control colors.
|
|
/// </summary>
|
|
public override void UpdateColors()
|
|
{
|
|
if (IsDisabled)
|
|
{
|
|
TextColor = Skin.Colors.Button.Disabled;
|
|
return;
|
|
}
|
|
|
|
if (m_PropertyRow != null && m_PropertyRow.IsEditing)
|
|
{
|
|
TextColor = Skin.Colors.Properties.Label_Selected;
|
|
return;
|
|
}
|
|
|
|
if (m_PropertyRow != null && m_PropertyRow.IsHovered)
|
|
{
|
|
TextColor = Skin.Colors.Properties.Label_Hover;
|
|
return;
|
|
}
|
|
|
|
TextColor = Skin.Colors.Properties.Label_Normal;
|
|
}
|
|
}
|
|
}
|