mirror of
https://github.com/koreader/koreader
synced 2024-11-10 01:10:34 +00:00
f05e62c1fb
Lots of code was doing some renderText calls to get the size of some text string, and truncate it to some width if needed, with or without an added ellipsis, before instantiating a TextWidget with that tweaked text string. This PR fixes/adds some properties and methods to TextWidget so all that can be done by it. It makes the calling code simpler, as they don't need to use RenderText directly. (Additionally, when we go at using Harfbuzz for text rendering, we'll just have to update or replace textwidget.lua without the need to update any higher level code.) Also: - RenderText: removed the space added by truncateTextByWidth after the ellipsis, as it doesn't feel needed, and break right alignment of the ellipsis with other texts. - KeyValuePage: fix some subtle size and alignment issues. - NumberPickerWidget: fix font size (provided font size was not used) |
||
---|---|---|
.. | ||
_meta.lua | ||
bookinfomanager.lua | ||
covermenu.lua | ||
listmenu.lua | ||
main.lua | ||
mosaicmenu.lua | ||
xutil.lua |