TextBoxWidget: optionally display a list of images

(each one at top right of each page)
Such images can be loaded dynamically when the display of a page requires it.
Allow alternating between the image and its title with Tap on it.
Allow for viewing this image zoomed in ImageViewer with Hold on it.

DictQuickLookup: add generic support for result.images, that
could optionally be provided in Wikipedia lookup results.
This commit is contained in:
poire-z
2018-01-16 12:32:49 +01:00
parent 0ef948f60d
commit 43ad2cef99
3 changed files with 392 additions and 18 deletions

View File

@@ -28,6 +28,7 @@ local ScrollTextWidget = InputContainer:new{
scroll_bar_width = Screen:scaleBySize(6),
text_scroll_span = Screen:scaleBySize(12),
dialog = nil,
images = nil,
}
function ScrollTextWidget:init()
@@ -38,9 +39,11 @@ function ScrollTextWidget:init()
editable = self.editable,
justified = self.justified,
face = self.face,
image_alt_face = self.image_alt_face,
fgcolor = self.fgcolor,
width = self.width - self.scroll_bar_width - self.text_scroll_span,
height = self.height
height = self.height,
images = self.images,
}
local visible_line_count = self.text_widget:getVisLineCount()
local total_line_count = self.text_widget:getAllLineCount()