mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
WTF-400 Move settings-related functions from util.go into common_settings.go
This commit is contained in:
@@ -14,8 +14,8 @@ const checkWidth = 4
|
||||
func (widget *Widget) display() {
|
||||
str := ""
|
||||
newList := checklist.NewChecklist(
|
||||
widget.settings.common.Sigils.CheckedIcon,
|
||||
widget.settings.common.Sigils.UncheckedIcon,
|
||||
widget.settings.common.Sigils.Checkbox.Checked,
|
||||
widget.settings.common.Sigils.Checkbox.Unchecked,
|
||||
)
|
||||
|
||||
offset := 0
|
||||
|
||||
@@ -54,7 +54,7 @@ func NewWidget(app *tview.Application, pages *tview.Pages, settings *Settings) *
|
||||
app: app,
|
||||
settings: settings,
|
||||
filePath: settings.filePath,
|
||||
list: checklist.NewChecklist(settings.common.Sigils.CheckedIcon, settings.common.Sigils.UncheckedIcon),
|
||||
list: checklist.NewChecklist(settings.common.Sigils.Checkbox.Checked, settings.common.Sigils.Checkbox.Unchecked),
|
||||
pages: pages,
|
||||
}
|
||||
|
||||
@@ -234,8 +234,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.CheckedIcon
|
||||
item.UncheckedIcon = widget.settings.common.UncheckedIcon
|
||||
item.CheckedIcon = widget.settings.common.Checkbox.Checked
|
||||
item.UncheckedIcon = widget.settings.common.Checkbox.Unchecked
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user