This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/config/config.go

53 lines
1.3 KiB
Go
Raw Normal View History

2023-02-02 13:19:56 -07:00
package config
2023-02-02 22:57:18 -07:00
// Config can return global configuration parameters.
2023-02-02 16:20:02 -07:00
type Config interface {
// 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.
Padding () int
// Margin returns how much space should be put in between elements.
Margin () int
// HandleWidth returns how large grab handles should typically be. This
// is important for accessibility reasons.
HandleWidth () int
// ScrollVelocity returns how many pixels should be scrolled every time
// a scroll button is pressed.
ScrollVelocity () int
// ThemePath returns the directory path to the theme.
ThemePath () string
}
// Default specifies default configuration values.
type Default struct { }
// Padding returns the default padding value.
func (Default) Padding () int {
2023-02-02 13:19:56 -07:00
return 7
}
2023-02-02 16:20:02 -07:00
// Margin returns the default margin value.
func (Default) Margin () int {
2023-02-02 13:19:56 -07:00
return 8
}
2023-02-02 16:20:02 -07:00
// HandleWidth returns the default handle width value.
func (Default) HandleWidth () int {
2023-02-02 13:19:56 -07:00
return 16
}
2023-02-02 16:20:02 -07:00
// ScrollVelocity returns the default scroll velocity value.
func (Default) ScrollVelocity () int {
return 16
}
// ThemePath returns the default theme path.
func (Default) ThemePath () (string) {
return ""
}