-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathTerminalGuiTheme.cs
42 lines (34 loc) · 1.45 KB
/
TerminalGuiTheme.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using Terminal.Gui;
namespace ii;
public class TerminalGuiTheme
{
public ColorSchemeBlueprint TopLevel { get; set; } = new();
public ColorSchemeBlueprint Base { get; set; } = new();
public ColorSchemeBlueprint Dialog { get; set; } = new();
public ColorSchemeBlueprint Menu { get; set; } = new();
public ColorSchemeBlueprint Error { get; set; } = new();
}
public class ColorSchemeBlueprint
{
public Color FocusForeground { get; set; }
public Color FocusBackground { get; set; }
public Color DisabledForeground { get; set; }
public Color DisabledBackground { get; set; }
public Color HotFocusForeground { get; set; }
public Color HotFocusBackground { get; set; }
public Color HotNormalForeground { get; set; }
public Color HotNormalBackground { get; set; }
public Color NormalForeground { get; set; }
public Color NormalBackground { get; set; }
public ColorScheme GetScheme()
{
return new ColorScheme
{
Focus = Application.Driver.MakeAttribute(FocusForeground, FocusBackground),
Disabled = Application.Driver.MakeAttribute(DisabledForeground, DisabledBackground),
HotFocus = Application.Driver.MakeAttribute(HotFocusForeground, HotFocusBackground),
HotNormal = Application.Driver.MakeAttribute(HotNormalForeground, HotNormalBackground),
Normal = Application.Driver.MakeAttribute(NormalForeground, NormalBackground),
};
}
}