Add styling for tear line

This commit is contained in:
Sasha Koshka 2024-06-07 17:36:10 -04:00
parent 880904d5fa
commit 4fff592a70
2 changed files with 70 additions and 7 deletions

View File

@ -50,13 +50,17 @@ 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 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 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 borderTear = borderEngraved
var borderTearFocused = border(0x7f94b5FF, 0xced7e4FF, 0xced7e4FF, 0x7f94b5FF, 1)
var borderTearPad = border(0x00000000, 0x00000000, 0x00000000, 0x00000000, 3)
var borderTearPadFocused = border(0x7391c080, 0x7391c080, 0x7391c080, 0x7391c080, 3)
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 {
// *.*[*]
@ -308,4 +312,27 @@ var rules = []dataTheme.Rule {
dataTheme.AttrColor { Color: colorDot },
),
},
// *.TearLine[*]
dataTheme.Rule {
Role: tomo.R("", "TearLine", ""),
Default: dataTheme.AS (
dataTheme.AttrBorder {
borderTearPad,
borderTear,
},
),
Hovered: dataTheme.AS (
dataTheme.AttrBorder {
borderTearPadFocused,
borderTearFocused,
},
),
Focused: dataTheme.AS (
dataTheme.AttrBorder {
borderTearPadFocused,
borderTearFocused,
},
),
},
}

View File

@ -306,4 +306,40 @@ var rules = []dataTheme.Rule {
dataTheme.AttrColor { Color: tomo.ColorAccent },
),
},
// *.TearLine[*]
dataTheme.Rule {
Role: tomo.R("", "TearLine", ""),
Default: dataTheme.AS (
dataTheme.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: [4]color.Color {
color.Transparent,
color.Transparent,
color.Transparent,
color.Transparent,
},
},
},
dataTheme.AttrColor { Color: tomo.ColorForeground },
dataTheme.AttrPadding(tomo.I(1, 0, 0, 1)),
),
Hovered: dataTheme.AS (
dataTheme.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
),
Focused: dataTheme.AS (
dataTheme.AttrBorder {
tomo.Border {
Width: tomo.I(3),
Color: borderColorFocused,
},
},
),
},
}