diff options
author | Benjamin Chausse <benjamin@chausse.xyz> | 2024-12-28 00:46:18 -0500 |
---|---|---|
committer | Benjamin Chausse <benjamin@chausse.xyz> | 2024-12-28 00:46:18 -0500 |
commit | 101e23780e5f8bc97f5683f5901fbd31f56ce29e (patch) | |
tree | 59a67abf320f8b77440cc7597331796f8b4a57a9 /internal/ui | |
parent | 914633df3e8da138bc2ac78f69fe340832e2283d (diff) |
First attempt at auto-resizecentral-ui
Diffstat (limited to 'internal/ui')
-rw-r--r-- | internal/ui/style.go | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/internal/ui/style.go b/internal/ui/style.go index 75d2f70..bab94ca 100644 --- a/internal/ui/style.go +++ b/internal/ui/style.go @@ -10,6 +10,7 @@ const ( textNorm = "#A7AFB1" textFaint = "#6F797B" geomFg = "#ACB3B5" + textWarn = "#EA9139" TabSepLeft = "[" TabSepMid = " | " @@ -23,6 +24,7 @@ const ( SliderMinWidth = 22 // 1 ASCII change every 2.05 deg. avg SliderMaxWidth = 90 // 2 ASCII change per deg. + BoxOffsetW, BoxOffsetH = 2, 2 ) type sliderOpts struct { @@ -42,6 +44,7 @@ type StyleSheet struct { InputPrompt lg.Style InputText lg.Style Notice lg.Style + TooSmall lg.Style Quit lg.Style Boxed lg.Style Sliders sliderOpts @@ -65,15 +68,15 @@ func init() { style = StyleSheet{ TabSel: baseStyle.Inherit(lg.NewStyle(). - Foreground(lg.Color(textSel)). Underline(true). - Bold(true)), + Bold(true)). + Foreground(lg.Color(textSel)), TabNorm: baseStyle.Inherit(lg.NewStyle(). - Foreground(lg.Color(textFaint)). Underline(false). Faint(true). - Bold(false)), + Bold(false)). + Foreground(lg.Color(textFaint)), TabGeom: baseStyle.Inherit(lg.NewStyle(). Foreground(lg.Color(geomFg))), @@ -95,9 +98,14 @@ func init() { Notice: baseStyle.Inherit(lg.NewStyle(). Bold(true)), + TooSmall: baseStyle.Inherit(lg.NewStyle(). + Bold(true)). + Blink(true). + Foreground(lg.Color(textWarn)), + Quit: baseStyle.Inherit(lg.NewStyle(). - Foreground(lg.Color(textSel)). - Bold(true)), + Bold(true)). + Foreground(lg.Color(textSel)), Boxed: baseStyle.Inherit(lg.NewStyle(). Border(lg.RoundedBorder())), |