mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Fix footnote size after screen rotation (#4316)
This commit is contained in:
@@ -103,8 +103,6 @@ local FootnoteWidget = InputContainer:new{
|
||||
top = Screen:scaleBySize(10),
|
||||
bottom = Screen:scaleBySize(10),
|
||||
},
|
||||
width = Screen:getWidth(),
|
||||
height = math.floor(Screen:getHeight() * 1/3), -- will be decreased when content is smaller
|
||||
follow_callback = nil,
|
||||
on_tap_close_callback = nil,
|
||||
close_callback = nil,
|
||||
@@ -112,6 +110,10 @@ local FootnoteWidget = InputContainer:new{
|
||||
}
|
||||
|
||||
function FootnoteWidget:init()
|
||||
-- Set widget size
|
||||
self.width = Screen:getWidth()
|
||||
self.height = math.floor(Screen:getHeight() * 1/3) -- will be decreased when content is smaller
|
||||
|
||||
if Device:isTouchDevice() then
|
||||
local range = Geom:new{
|
||||
x = 0, y = 0,
|
||||
|
||||
Reference in New Issue
Block a user