2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00
koreader/plugins/coverbrowser.koplugin
poire-z f05e62c1fb
TextWidget: small refactoring, better handle max_width (#5503)
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)
2019-10-21 15:20:40 +02:00
..
_meta.lua [Fix] Don't load disabled plugins (#4169) 2018-08-18 20:41:37 +02:00
bookinfomanager.lua [lang] Miscellaneous improvements (#5263) 2019-08-25 22:37:26 +02:00
covermenu.lua TextWidget: small refactoring, better handle max_width (#5503) 2019-10-21 15:20:40 +02:00
listmenu.lua UI Changes (#5508) 2019-10-21 14:24:29 +02:00
main.lua UI Changes (#5508) 2019-10-21 14:24:29 +02:00
mosaicmenu.lua Various blitting related cleanups (#4789) 2019-03-14 20:58:45 +01:00
xutil.lua coverbrowser: keep up to date with recent core changes (#3707) 2018-03-02 13:03:39 +01:00