Skip to content

Commit

Permalink
Replace checkbox with toggle in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikKalkoken committed Oct 25, 2024
1 parent 3d2df4f commit 4238091
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/ui/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,17 @@ func (u *UI) showSettingsDialog() {
}

// apply file filter
extFilter := widget.NewCheck("enabled", func(v bool) {
extFilter := kxwidget.NewToggle(func(v bool) {
u.app.Preferences().SetBool(settingExtensionFilter, v)
})
y := u.app.Preferences().BoolWithFallback(settingExtensionFilter, settingExtensionDefault)
extFilter.SetChecked(y)
extFilter.SetState(y)

notifyUpdates := widget.NewCheck("enabled", func(v bool) {
notifyUpdates := kxwidget.NewToggle(func(v bool) {
u.app.Preferences().SetBool(settingNotifyUpdates, v)
})
z := u.app.Preferences().BoolWithFallback(settingNotifyUpdates, settingNotifyUpdatesDefault)
notifyUpdates.SetChecked(z)
notifyUpdates.SetState(z)

items := []*widget.FormItem{
{Text: "Max recent files", Widget: recentEntry, HintText: "Maximum number of recent files remembered"},
Expand Down

0 comments on commit 4238091

Please sign in to comment.