Class Theme

Namespace
Forma
Assembly
Forma.dll

A small, deterministic theme used when an application does not provide custom drawing.

public sealed class Theme
Inheritance
Theme
Inherited Members

Constructors

Theme()

public Theme()

Properties

AccentColor

public Color AccentColor { get; set; }

Property Value

Color

BackgroundColor

public Color BackgroundColor { get; set; }

Property Value

Color

BorderWidth

public float BorderWidth { get; set; }

Property Value

float

ConnectionActivityColor

Godot-style GraphEdit activity tint applied to active connection lines.

public Color ConnectionActivityColor { get; set; }

Property Value

Color

DisabledTextColor

public Color DisabledTextColor { get; set; }

Property Value

Color

FocusColor

public Color FocusColor { get; set; }

Property Value

Color

FontFamily

Inherited default font family used by text controls without a local font override.

public UIFontFamily FontFamily { get; set; }

Property Value

UIFontFamily

FontHinting

Inherited dynamic glyph hinting policy.

public UIFontHinting FontHinting { get; set; }

Property Value

UIFontHinting

FontOpenTypeFeatures

Inherited OpenType feature defaults used unless a control supplies explicit features.

public IReadOnlyList<UIFontOpenTypeFeature> FontOpenTypeFeatures { get; set; }

Property Value

IReadOnlyList<UIFontOpenTypeFeature>

FontSize

Inherited logical font size. Zero keeps the selected family's primary font size.

public float FontSize { get; set; }

Property Value

float

HoverColor

public Color HoverColor { get; set; }

Property Value

Color

PanelBorderColor

public Color PanelBorderColor { get; set; }

Property Value

Color

PanelColor

public Color PanelColor { get; set; }

Property Value

Color

Parent

Optional parent. Unspecified colors, constants and style items resolve through it.

public Theme Parent { get; set; }

Property Value

Theme

PressedColor

public Color PressedColor { get; set; }

Property Value

Color

Separation

public float Separation { get; set; }

Property Value

float

TextColor

public Color TextColor { get; set; }

Property Value

Color

Version

public long Version { get; }

Property Value

long

Methods

GetControlTemplate(Type)

public ControlTemplate GetControlTemplate(Type controlType)

Parameters

controlType Type

Returns

ControlTemplate

GetIcon(string, string)

Gets a typed or shared icon, including parent-theme inheritance.

public ThemeIcon? GetIcon(string itemName, string typeName = null)

Parameters

itemName string
typeName string

Returns

ThemeIcon?

GetStyleBox(string, string)

Gets a style item, first considering the requested control type then the shared item.

public StyleBox GetStyleBox(string itemName, string typeName = null)

Parameters

itemName string
typeName string

Returns

StyleBox

RemoveControlTemplate(Type)

public bool RemoveControlTemplate(Type controlType)

Parameters

controlType Type

Returns

bool

RemoveIcon(string, string)

Removes a local icon entry so parent and default themes become visible again.

public void RemoveIcon(string itemName, string typeName = null)

Parameters

itemName string
typeName string

SetControlTemplate(Type, ControlTemplate)

public void SetControlTemplate(Type controlType, ControlTemplate template)

Parameters

controlType Type
template ControlTemplate

SetControlTemplate<TControl>(ControlTemplate)

public void SetControlTemplate<TControl>(ControlTemplate template) where TControl : TemplatedControl

Parameters

template ControlTemplate

Type Parameters

TControl

SetIcon(string, ThemeIcon, string)

Assigns a non-owning icon value, optionally scoped to a control type name.

public void SetIcon(string itemName, ThemeIcon icon, string typeName = null)

Parameters

itemName string
icon ThemeIcon
typeName string

SetStyleBox(string, StyleBox, string)

Assigns a style item, optionally scoped to a control type name.

public void SetStyleBox(string itemName, StyleBox styleBox, string typeName = null)

Parameters

itemName string
styleBox StyleBox
typeName string

SuppressIcon(string, string)

Suppresses an inherited icon without supplying a replacement.

public void SuppressIcon(string itemName, string typeName = null)

Parameters

itemName string
typeName string

Events

Changed

public event EventHandler Changed

Event Type

EventHandler