2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

PageBrowser: fix drawing of thicker thumbnail frame on tap (#12432)

Bottom and right edges were not drawn since some
recent FrameContainer tweak.
This commit is contained in:
poire-z 2024-08-30 14:40:14 +02:00 committed by GitHub
parent 7e52c15de2
commit d51179690d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1424,7 +1424,11 @@ function PageBrowserWidget:onTap(arg, ges)
local orig_bordersize = thumb_frame.bordersize
thumb_frame.bordersize = Size.border.thick * 2
local b_inc = thumb_frame.bordersize - orig_bordersize
UIManager:widgetRepaint(thumb_frame, thumb_frame.dimen.x-b_inc, thumb_frame.dimen.y-b_inc)
thumb_frame.dimen.x = thumb_frame.dimen.x - b_inc
thumb_frame.dimen.y = thumb_frame.dimen.y - b_inc
thumb_frame.dimen.w = thumb_frame.dimen.w + 2*b_inc
thumb_frame.dimen.h = thumb_frame.dimen.h + 2*b_inc
UIManager:widgetRepaint(thumb_frame, thumb_frame.dimen.x, thumb_frame.dimen.y)
Screen:refreshFast(thumb_frame.dimen.x, thumb_frame.dimen.y, thumb_frame.dimen.w, thumb_frame.dimen.h)
-- (refresh "fast" will make gray drawn black and may make the
-- thumbnail a little uglier - but this enhances the effect