From 8606968c74ea567d3a09435929b9a9265fcae893 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Thu, 2 Feb 2023 15:19:56 -0500 Subject: [PATCH] Separate config and theme --- config/config.go | 22 ++++++++++++++++++++++ theme/theme.go | 21 --------------------- 2 files changed, 22 insertions(+), 21 deletions(-) create mode 100644 config/config.go diff --git a/config/config.go b/config/config.go new file mode 100644 index 0000000..8828639 --- /dev/null +++ b/config/config.go @@ -0,0 +1,22 @@ +package config + +// 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 16 +} diff --git a/theme/theme.go b/theme/theme.go index 168b25d..3f59fe6 100644 --- a/theme/theme.go +++ b/theme/theme.go @@ -111,24 +111,3 @@ func FontFaceItalic () font.Face { func FontFaceBoldItalic () font.Face { return defaultfont.FaceBoldItalic } - -// 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 16 -}