mirror of https://github.com/rivo/tview.git
commit
de9730f6df
12
styles.go
12
styles.go
|
@ -4,10 +4,7 @@ import "github.com/gdamore/tcell"
|
||||||
|
|
||||||
// Styles defines various colors used when primitives are initialized. These
|
// Styles defines various colors used when primitives are initialized. These
|
||||||
// may be changed to accommodate a different look and feel.
|
// may be changed to accommodate a different look and feel.
|
||||||
//
|
type Theme struct {
|
||||||
// The default is for applications with a black background and basic colors:
|
|
||||||
// black, white, yellow, green, and blue.
|
|
||||||
var Styles = struct {
|
|
||||||
PrimitiveBackgroundColor tcell.Color // Main background color for primitives.
|
PrimitiveBackgroundColor tcell.Color // Main background color for primitives.
|
||||||
ContrastBackgroundColor tcell.Color // Background color for contrasting elements.
|
ContrastBackgroundColor tcell.Color // Background color for contrasting elements.
|
||||||
MoreContrastBackgroundColor tcell.Color // Background color for even more contrasting elements.
|
MoreContrastBackgroundColor tcell.Color // Background color for even more contrasting elements.
|
||||||
|
@ -19,7 +16,12 @@ var Styles = struct {
|
||||||
TertiaryTextColor tcell.Color // Tertiary text (e.g. subtitles, notes).
|
TertiaryTextColor tcell.Color // Tertiary text (e.g. subtitles, notes).
|
||||||
InverseTextColor tcell.Color // Text on primary-colored backgrounds.
|
InverseTextColor tcell.Color // Text on primary-colored backgrounds.
|
||||||
ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds.
|
ContrastSecondaryTextColor tcell.Color // Secondary text on ContrastBackgroundColor-colored backgrounds.
|
||||||
}{
|
}
|
||||||
|
|
||||||
|
// Styles is the global singleton which effects the current theming of widgets
|
||||||
|
// The default is for applications with a black background and basic colors:
|
||||||
|
// black, white, yellow, green, and blue.
|
||||||
|
var Styles = Theme{
|
||||||
PrimitiveBackgroundColor: tcell.ColorBlack,
|
PrimitiveBackgroundColor: tcell.ColorBlack,
|
||||||
ContrastBackgroundColor: tcell.ColorBlue,
|
ContrastBackgroundColor: tcell.ColorBlue,
|
||||||
MoreContrastBackgroundColor: tcell.ColorGreen,
|
MoreContrastBackgroundColor: tcell.ColorGreen,
|
||||||
|
|
Loading…
Reference in New Issue