Dialog boxes have icons now

This commit is contained in:
Sasha Koshka 2024-08-23 21:39:39 -04:00
parent 73731c6201
commit d1f0786043

View File

@ -53,6 +53,7 @@ func NewDialog (kind DialogKind, parent tomo.Window, title, message string, opti
case DialogError: iconId = tomo.IconDialogError case DialogError: iconId = tomo.IconDialogError
} }
dialog.SetTitle(title) dialog.SetTitle(title)
dialog.SetIcon(iconId)
icon := NewIcon(iconId, tomo.IconSizeLarge) icon := NewIcon(iconId, tomo.IconSizeLarge)
messageText := NewLabel(message) messageText := NewLabel(message)
messageText.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle)) messageText.SetAttr(tomo.AAlign(tomo.AlignStart, tomo.AlignMiddle))