diff --git a/modules/todo/settings.go b/modules/todo/settings.go index 9bde93ad..247acbdb 100644 --- a/modules/todo/settings.go +++ b/modules/todo/settings.go @@ -13,15 +13,21 @@ const ( type Settings struct { common *cfg.Common - filePath string + filePath string + checked string + unchecked string } func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings { - settings := Settings{ - common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig), + common := cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig) - filePath: ymlConfig.UString("filename"), + settings := Settings{ + common: common, + + filePath: ymlConfig.UString("filename"), + checked: ymlConfig.UString("checkedIcon", common.Checkbox.Checked), + unchecked: ymlConfig.UString("uncheckedIcon", common.Checkbox.Unchecked), } return &settings diff --git a/modules/todo/widget.go b/modules/todo/widget.go index dc68435e..dfbc357d 100644 --- a/modules/todo/widget.go +++ b/modules/todo/widget.go @@ -155,8 +155,8 @@ func (widget *Widget) persist() { // items have the correct checked/unchecked icon per the user's preferences func (widget *Widget) setItemChecks() { for _, item := range widget.list.Items { - item.CheckedIcon = widget.settings.common.Checkbox.Checked - item.UncheckedIcon = widget.settings.common.Checkbox.Unchecked + item.CheckedIcon = widget.settings.checked + item.UncheckedIcon = widget.settings.unchecked } }