|
@@ -7,31 +7,7 @@ import (
|
|
|
"github.com/gdamore/tcell/v2"
|
|
"github.com/gdamore/tcell/v2"
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-var (
|
|
|
|
|
- errInvalidType = errors.New("invalid type")
|
|
|
|
|
-)
|
|
|
|
|
-
|
|
|
|
|
-type BorderSetWrapper struct{ tview.BorderSet }
|
|
|
|
|
-
|
|
|
|
|
-func (bw *BorderSetWrapper) UnmarshalTOML(val any) error {
|
|
|
|
|
- s, ok := val.(string)
|
|
|
|
|
- if !ok {
|
|
|
|
|
- return errInvalidType
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- switch s {
|
|
|
|
|
- case "plain":
|
|
|
|
|
- bw.BorderSet = tview.BorderSetPlain()
|
|
|
|
|
- case "round":
|
|
|
|
|
- bw.BorderSet = tview.BorderSetRound()
|
|
|
|
|
- case "thick":
|
|
|
|
|
- bw.BorderSet = tview.BorderSetThick()
|
|
|
|
|
- case "double":
|
|
|
|
|
- bw.BorderSet = tview.BorderSetDouble()
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- return nil
|
|
|
|
|
-}
|
|
|
|
|
|
|
+var errInvalidType = errors.New("invalid type")
|
|
|
|
|
|
|
|
type AlignmentWrapper struct{ tview.Alignment }
|
|
type AlignmentWrapper struct{ tview.Alignment }
|
|
|
|
|
|
|
@@ -113,18 +89,6 @@ type (
|
|
|
ActiveStyle StyleWrapper `toml:"active_style"`
|
|
ActiveStyle StyleWrapper `toml:"active_style"`
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- TitleTheme struct {
|
|
|
|
|
- ThemeStyle
|
|
|
|
|
- Alignment AlignmentWrapper `toml:"alignment"`
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- BorderTheme struct {
|
|
|
|
|
- ThemeStyle
|
|
|
|
|
- Enabled bool `toml:"enabled"`
|
|
|
|
|
- Padding [4]int `toml:"padding"`
|
|
|
|
|
- Set BorderSetWrapper `toml:"set"`
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
GuildsTreeTheme struct {
|
|
GuildsTreeTheme struct {
|
|
|
AutoExpandFolders bool `toml:"auto_expand_folders"`
|
|
AutoExpandFolders bool `toml:"auto_expand_folders"`
|
|
|
Graphics bool `toml:"graphics"`
|
|
Graphics bool `toml:"graphics"`
|