From 6cb908ea6ee909e761301e8adfc06d49aba44ae9 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Mon, 3 Jun 2024 22:49:02 -0400 Subject: [PATCH] Tweaks to the aluminum theme --- internal/theme/style/aluminum/default.go | 4 +-- internal/theme/style/aluminum/style.go | 42 +++++++++++++++--------- 2 files changed, 28 insertions(+), 18 deletions(-) diff --git a/internal/theme/style/aluminum/default.go b/internal/theme/style/aluminum/default.go index c59cdef..0a7c40d 100644 --- a/internal/theme/style/aluminum/default.go +++ b/internal/theme/style/aluminum/default.go @@ -10,8 +10,8 @@ func New () *dataTheme.Theme { Colors: map[tomo.Color] color.Color { tomo.ColorBackground: colorBackground, tomo.ColorForeground: colorForeground, - tomo.ColorRaised: colorCarved, - tomo.ColorSunken: colorCarved, + tomo.ColorRaised: colorRaised, + tomo.ColorSunken: colorSunken, tomo.ColorAccent: colorFocus, }, Rules: rules, diff --git a/internal/theme/style/aluminum/style.go b/internal/theme/style/aluminum/style.go index 59aa809..f7716fb 100644 --- a/internal/theme/style/aluminum/style.go +++ b/internal/theme/style/aluminum/style.go @@ -26,15 +26,19 @@ func border (top, right, bottom, left uint32, width ...int) tomo.Border { var colorDot = hex(0x7391c080) var colorFocus = hex(0x5f8bc4FF) var colorHighlight = hex(0x5f8bc4FF) -var colorBackground = hex(0xd6d6d6FF) +var colorBackground = hex(0xd4d4d4FF) var colorForeground = color.Black + var colorOutline = color.Black var colorGutter = hex(0xbfc6d1FF) var colorGutterHovered = hex(0xc5cbd6FF) -var colorCarved = hex(0xe9eaeaFF) -var colorCarvedPressed = hex(0xe3e4e4FF) -var colorCarvedFocused = hex(0xe4e6e8FF) -var colorCarvedHovered = hex(0xf1f3f5FF) +var colorRaised = hex(0xe9eaeaFF) +var colorRaisedPressed = hex(0xccd4ddFF) +var colorRaisedFocused = hex(0xcfd6ddFF) +var colorRaisedHovered = hex(0xf1f3f5FF) +var colorSunken = hex(0xe9eaeaFF) +var colorSunkenFocused = hex(0xe0e6eeFF) +var colorSunkenPressed = hex(0xe0e6eeFF) var outline = tomo.Border { Width: tomo.I(1), @@ -46,12 +50,13 @@ var outline = tomo.Border { }, } -var borderEngraved = border(0xc3c3c5FF, 0xe3e3e3FF, 0xe9e9e9ff, 0xc2c2c2ff, 1) -var borderGap = border(0x697c7cFF, 0x566767FF, 0x566767ff, 0x697c7cff, 1) -var borderLifted = border(0xf9fafcFF, 0xc2c8d3FF, 0xa4afc0ff, 0xf5f6f8ff, 1) -var borderFocused = border(0x5f8bc4FF, 0x5f8bc4FF, 0x5f8bc4ff, 0x5f8bc4ff, 1) -var borderInnerShadow = border(0xa4afc0FF, 0xa4afc0FF, 0xa4afc0ff, 0xa4afc0ff, 1, 0, 0, 1) -var borderOuterShadow = border(0xa4afc0FF, 0xa4afc0FF, 0xa4afc0ff, 0xa4afc0ff, 0, 1, 1, 0) +var borderEngraved = border(0xc3c3c5FF, 0xe3e3e3FF, 0xe9e9e9ff, 0xc2c2c2ff, 1) +var borderGap = border(0x697c7cFF, 0x566767FF, 0x566767ff, 0x697c7cff, 1) +var borderLifted = border(0xf9fafcFF, 0xc2c8d3FF, 0xa4afc0ff, 0xf5f6f8ff, 1) +var borderLiftedFocused = border(0xf0f4f9FF, 0xb1bacaFF, 0x9aa6b7ff, 0xe4e9eeff, 1) +var borderFocused = border(0x5f8bc4FF, 0x5f8bc4FF, 0x5f8bc4ff, 0x5f8bc4ff, 1) +var borderInnerShadow = border(0xa4afc0FF, 0xa4afc0FF, 0xa4afc0ff, 0xa4afc0ff, 1, 0, 0, 1) +var borderOuterShadow = border(0xa4afc0FF, 0xa4afc0FF, 0xa4afc0ff, 0xa4afc0ff, 0, 1, 1, 0) var rules = []dataTheme.Rule { // *.*[*] @@ -83,19 +88,19 @@ var rules = []dataTheme.Rule { borderInnerShadow, }, dataTheme.AttrPadding(tomo.I(5, 8, 4, 9)), - dataTheme.AttrColor { Color: colorCarvedPressed }, + dataTheme.AttrColor { Color: colorRaisedPressed }, ), Focused: dataTheme.AS ( dataTheme.AttrBorder { borderEngraved, - borderFocused, - borderLifted, + borderGap, + borderLiftedFocused, }, dataTheme.AttrPadding(tomo.I(4, 8)), - dataTheme.AttrColor { Color: colorCarvedFocused }, + dataTheme.AttrColor { Color: colorRaisedFocused }, ), Hovered: dataTheme.AS ( - dataTheme.AttrColor { Color: colorCarvedHovered }, + dataTheme.AttrColor { Color: colorRaisedHovered }, ), }, @@ -117,6 +122,10 @@ var rules = []dataTheme.Rule { borderFocused, borderInnerShadow, }, + dataTheme.AttrColor { Color: colorSunkenFocused }, + ), + Pressed: dataTheme.AS ( + dataTheme.AttrColor { Color: colorSunkenPressed }, ), }, @@ -265,6 +274,7 @@ var rules = []dataTheme.Rule { borderInnerShadow, }, dataTheme.AttrPadding(tomo.I(0)), + dataTheme.AttrColor { Color: colorSunkenFocused }, ), },