InfoMessage: avoid overflowing screen height with long messages

When no height= provided, and the InfoMessage would overflow
screen height when some long message is provided, decrease the
font size until the widget fit.
This commit is contained in:
poire-z
2019-01-15 20:38:25 +01:00
parent c327069f43
commit f533acb7f9
4 changed files with 36 additions and 12 deletions

View File

@@ -439,13 +439,11 @@ You can enable individual tweaks on this book with a tap, or view more details a
callback = function()
UIManager:show(InfoMessage:new{
text = item.info_text,
face = Font:getFace(item.smaller_font and "x_smallinfofont" or "smallinfofont"),
})
end,
hold_callback = function()
UIManager:show(InfoMessage:new{
text = item.info_text,
face = Font:getFace(item.smaller_font and "x_smallinfofont" or "smallinfofont"),
})
end,
separator = item.separator,