Skip to content

Commit

Permalink
PageBrowser: fix drawing of thicker thumbnail frame on tap (koreader#…
Browse files Browse the repository at this point in the history
…12432)

Bottom and right edges were not drawn since some
recent FrameContainer tweak.
  • Loading branch information
poire-z authored Aug 30, 2024
1 parent 7e52c15 commit d511796
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/ui/widget/pagebrowserwidget.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d511796

Please sign in to comment.