From 5eabb296107b1fbf284a77eff89c73b9b0e0df0f Mon Sep 17 00:00:00 2001 From: Delaney Gillilan Date: Wed, 5 Dec 2018 09:17:01 -0800 Subject: [PATCH] add theme --- styles.go | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/styles.go b/styles.go index dbd60ad..237d07c 100644 --- a/styles.go +++ b/styles.go @@ -4,10 +4,7 @@ import "github.com/gdamore/tcell" // Styles defines various colors used when primitives are initialized. These // may be changed to accommodate a different look and feel. -// -// The default is for applications with a black background and basic colors: -// black, white, yellow, green, and blue. -var Styles = struct { +type Theme struct { PrimitiveBackgroundColor tcell.Color // Main background color for primitives. ContrastBackgroundColor tcell.Color // Background color for 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). InverseTextColor tcell.Color // Text on primary-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, ContrastBackgroundColor: tcell.ColorBlue, MoreContrastBackgroundColor: tcell.ColorGreen,