blob: 5452e57317f208ad1c49a97d37bd6f7b6135a193 (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
package tui
import common "ior/internal/tui/common"
var (
// Palette colors shared across the TUI package.
ColorBackground = common.ColorBackground
ColorPanel = common.ColorPanel
ColorPrimary = common.ColorPrimary
ColorAccent = common.ColorAccent
ColorMuted = common.ColorMuted
ColorText = common.ColorText
ColorDanger = common.ColorDanger
)
var (
// ScreenStyle is the base style for full-screen models.
ScreenStyle = common.ScreenStyle
// HeaderStyle is used by top-level titles and screen headers.
HeaderStyle = common.HeaderStyle
// TabActiveStyle is applied to the currently-selected tab.
TabActiveStyle = common.TabActiveStyle
// TabInactiveStyle is applied to non-selected tabs.
TabInactiveStyle = common.TabInactiveStyle
// HelpBarStyle is used for keybinding hints at the bottom.
HelpBarStyle = common.HelpBarStyle
// HighlightStyle emphasizes inline values.
HighlightStyle = common.HighlightStyle
// ErrorStyle is used for fatal or warning messages.
ErrorStyle = common.ErrorStyle
)
func syncStylesFromCommon() {
ColorBackground = common.ColorBackground
ColorPanel = common.ColorPanel
ColorPrimary = common.ColorPrimary
ColorAccent = common.ColorAccent
ColorMuted = common.ColorMuted
ColorText = common.ColorText
ColorDanger = common.ColorDanger
ScreenStyle = common.ScreenStyle
HeaderStyle = common.HeaderStyle
TabActiveStyle = common.TabActiveStyle
TabInactiveStyle = common.TabInactiveStyle
HelpBarStyle = common.HelpBarStyle
HighlightStyle = common.HighlightStyle
ErrorStyle = common.ErrorStyle
}
func init() {
syncStylesFromCommon()
}
|