mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Add a global Redraw method for TextWidget
Partially addresses #429, by centralizing widget drawing
This commit is contained in:
@@ -42,10 +42,7 @@ func (widget *Widget) Refresh() {
|
||||
wtf.Now().Format(wtf.DateFormat),
|
||||
)
|
||||
|
||||
widget.app.QueueUpdateDraw(func() {
|
||||
widget.View.SetTitle(widget.ContextualTitle(widget.CommonSettings.Title))
|
||||
widget.View.SetText(widget.contentFrom(todayItems))
|
||||
})
|
||||
widget.Redraw(widget.CommonSettings.Title, widget.contentFrom(todayItems), false)
|
||||
}
|
||||
|
||||
/* -------------------- Unexported Functions -------------------- */
|
||||
|
||||
Reference in New Issue
Block a user