diff --git a/modules/todo/settings.go b/modules/todo/settings.go index 9bde93adf..247acbdb3 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 { + common := cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig) + settings := Settings{ - common: cfg.NewCommonSettingsFromModule(name, defaultTitle, defaultFocusable, ymlConfig, globalConfig), + common: common, - filePath: ymlConfig.UString("filename"), + 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 dc68435ef..dfbc357da 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 } }