Notification: closed by any event, but not consuming it

Make Notification have toast=true, and UIManager deal
specifically with such widget:
a "toast" widget gets closed by any event, and let
the event be handled by a lower widget.
This should allow us to not wait or tap to get rid
of a notification, and just go on with what we're
doing.
Also make them have a default timeout of 2s,
used with all existing ones.
This commit is contained in:
poire-z
2021-01-11 18:14:12 +01:00
parent f1046f07a9
commit 8f79c662cf
13 changed files with 43 additions and 56 deletions

View File

@@ -205,7 +205,6 @@ function InputText:isTextEditable(show_warning)
if show_warning and not self.is_text_editable then
UIManager:show(Notification:new{
text = _("Text may be binary content, and is not editable"),
timeout = 2
})
end
return self.is_text_editable