Theming tweaks and rendering fixes

This commit is contained in:
Sasha Koshka
2023-02-27 17:00:28 -05:00
parent 8dd506a007
commit ee45b2fa60
5 changed files with 21 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@@ -117,8 +117,17 @@ func (Default) Color (id Color, state State, c Case) color.RGBA {
}
// Padding returns the default padding value for the given pattern.
func (Default) Padding (pattern Pattern, c Case) artist.Inset {
return artist.Inset { 8, 8, 8, 8 }
func (Default) Padding (id Pattern, c Case) artist.Inset {
switch id {
case PatternSunken:
if c == C("basic", "list") {
return artist.Inset { 2, 2, 2, 2 }
} else {
return artist.Inset { 8, 8, 8, 8 }
}
case PatternGutter: return artist.Inset { }
default: return artist.Inset { 8, 8, 8, 8 }
}
}
// Margin returns the default margin value for the given pattern.