Padding and margin are now separate

This commit is contained in:
2023-01-30 18:22:19 -05:00
parent 6b19d66067
commit 0c5cc6ff74
5 changed files with 54 additions and 46 deletions

View File

@@ -41,4 +41,3 @@ var focusedOnListEntryPattern = artist.Padded {
Fill: uhex(0x6e8079FF),
Sides: []int { 0, 1, 0, 1 },
}

View File

@@ -112,14 +112,23 @@ func FontFaceBoldItalic () font.Face {
return defaultfont.FaceBoldItalic
}
// Padding returns how spaced out things should be on the screen. Generally,
// text should be offset from its container on all sides by this amount.
// Padding returns the amount of internal padding elements should have. An
// element's inner content (such as text) should be inset by this amount,
// in addition to the inset returned by the pattern of its background. When
// using the aforementioned inset values to calculate the element's minimum size
// or the position and alignment of its content, all parameters in the
// PatternState should be unset except for Case.
func Padding () int {
return 7
}
// Margin returns how much space should be put in between elements.
func Margin () int {
return 8
}
// HandleWidth returns how large grab handles should typically be. This is
// important for accessibility reasons.
func HandleWidth () int {
return Padding() * 2
return 16
}