Update Tomo API

This commit is contained in:
2024-05-27 15:22:18 -04:00
parent 6389556199
commit bd9dbb762d
6 changed files with 13 additions and 16 deletions

View File

@@ -75,8 +75,7 @@ func NewDialog (kind DialogKind, parent tomo.Window, title, message string, opti
// NewDialogOk creates a new dialog window with an OK option.
func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) {
okButton := NewButton("OK")
// FIXME: need dialog accept/reject action icons
// okButton.SetIcon(tomo.IconStatusOkay)
okButton.SetIcon(tomo.IconDialogOkay)
okButton.OnClick(func () {
if onOk != nil { onOk() }
})
@@ -88,12 +87,10 @@ func NewDialogOk (kind DialogKind, parent tomo.Window, title, message string, on
// NewDialogOkCancel creates a new dialog window with OK and Cancel options.
func NewDialogOkCancel (kind DialogKind, parent tomo.Window, title, message string, onOk func ()) (*Dialog, error) {
cancelButton := NewButton("Cancel")
// FIXME: need dialog accept/reject action icons
// cancelButton.SetIcon(tomo.IconStatusCancel)
cancelButton.SetIcon(tomo.IconDialogCancel)
okButton := NewButton("OK")
// FIXME: need dialog accept/reject action icons
// okButton.SetIcon(tomo.IconStatusOkay)
okButton.SetIcon(tomo.IconDialogOkay)
okButton.OnClick(func () {
if onOk != nil { onOk() }
})