You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
koreader/frontend/ui/widget
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)
5 years ago
..
container [chore] Convert a couple more todos (#5267) 5 years ago
bboxwidget.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
bookstatuswidget.lua Some BookStatus QoL tweaks (#5100) 5 years ago
button.lua [UX] Sort footer elements (#5389) 5 years ago
buttondialog.lua Add MovableContainer: allow moving some widgets (#3636) 6 years ago
buttondialogtitle.lua [UX] Links menu and handling tweaks (#4867) 5 years ago
buttonprogresswidget.lua [UX] Better align buttonprogress in configdialog (#5427) 5 years ago
buttontable.lua Some BookStatus QoL tweaks (#5100) 5 years ago
checkbutton.lua Enable HW dithering in a few key places (#4541) 5 years ago
checkmark.lua Various blitting related cleanups (#4789) 5 years ago
closebutton.lua Fix some widget title height and close button alignment (#3366) 7 years ago
configdialog.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
confirmbox.lua Add MovableContainer: allow moving some widgets (#3636) 6 years ago
datewidget.lua [fix, UX] timewidget and datewidget in landscape mode (#3666) 6 years ago
dictquicklookup.lua [fix] Pass plain link to link:onGotoLink (#5286) 5 years ago
eventlistener.lua Add restart koreader function and ensure FlushSettings event can be delivered to all widgets (#2772) 7 years ago
filechooser.lua [feat, i18n] Implement ngettext (#5257) 5 years ago
fixedtextwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
focusmanager.lua A few graphics fixes after #4541 (#4554) 5 years ago
footnotewidget.lua cre: fix 2 footnotes issues, bump crengine (#5031) 5 years ago
frontlightwidget.lua [UX] Use ProgressWidget in frontlight (#5373) 5 years ago
horizontalgroup.lua [doc] some widget docs 7 years ago
horizontalspan.lua cleanup: expand tab to 4 spaces 10 years ago
htmlboxwidget.lua use screen for UI color control 5 years ago
hyphenationlimits.lua [CI] Switch to custom xgettext build to extract multiline strings (#5242) 5 years ago
iconbutton.lua Fix: Unable to hold top right corner in FileManager (#5248) 5 years ago
imageviewer.lua ImageViewer: start with image fullscreen with no buttons shown (#5446) 5 years ago
imagewidget.lua Allow toggling CRe's new dithering & scaling (#4922) 5 years ago
infomessage.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
inputdialog.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
inputtext.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
keyvaluepage.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
linewidget.lua [chore] Convert a couple more todos (#5267) 5 years ago
linkbox.lua Various blitting related cleanups (#4789) 5 years ago
listview.lua Various blitting related cleanups (#4789) 5 years ago
logindialog.lua Text editor plugin, InputDialog enhancements (#4135) 6 years ago
menu.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
multiconfirmbox.lua Wikipedia link: check if previously saved as EPUB (#3837) 6 years ago
multiinputdialog.lua A few graphics fixes after #4541 (#4554) 5 years ago
naturallightwidget.lua Enable HW dithering in a few key places (#4541) 5 years ago
networksetting.lua [UX] Add timeout to Wi-Fi connected message (#5514) 5 years ago
notification.lua bump crengine: fix drawing position of bottom and right borders (#4013) 6 years ago
numberpickerwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
opdsbrowser.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
openwithdialog.lua Various blitting related cleanups (#4789) 5 years ago
overlapgroup.lua [doc] some widget docs 7 years ago
pathchooser.lua PathChooser: clearer usage and behaviour (#4133) 6 years ago
physicalkeyboard.lua Various blitting related cleanups (#4789) 5 years ago
progresswidget.lua [UX] Option to show progress bar at the bottom of the screen (#5442) 5 years ago
radiobutton.lua Enable HW dithering in a few key places (#4541) 5 years ago
radiobuttontable.lua Various blitting related cleanups (#4789) 5 years ago
rectspan.lua cleanup: expand tab to 4 spaces 10 years ago
screensaverwidget.lua A few minor fixes after #4541 (#4561) 5 years ago
screenshoter.lua Set screenshot output folder (#5382) 5 years ago
scrollhtmlwidget.lua [fix] widget/scrollhtmlwidget: default_font_size same as infofont and Screen:scaleBySize() (#4864) 5 years ago
scrolltextwidget.lua A few graphics fixes after #4541 (#4554) 5 years ago
sortwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
spinwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
textboxwidget.lua [doc] Tag @todo, @fixme and @warning (#5244) 5 years ago
textviewer.lua Enable HW dithering in a few key places (#4541) 5 years ago
textwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
timewidget.lua [fix, UX] timewidget and datewidget in landscape mode (#3666) 6 years ago
toggleswitch.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
touchmenu.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
trapwidget.lua TextWidget: small refactoring, better handle max_width (#5503) 5 years ago
verticalgroup.lua [doc] some widget docs 7 years ago
verticalscrollbar.lua Text input related fixes & enhancements (#4124) 6 years ago
verticalspan.lua cleanup: expand tab to 4 spaces 10 years ago
virtualkeyboard.lua [feat] Add haptic feedback (#5380) 5 years ago
widget.lua doc: fix document build 8 years ago