mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
restrict dictionary window inside of screen especially in landscape mode
This should fix #2020.
This commit is contained in:
@@ -108,11 +108,11 @@ function DictQuickLookup:update()
|
||||
}
|
||||
if self.word_box then
|
||||
local box = self.word_box
|
||||
if box.y + box.h/2 < Screen:getHeight()/2 then
|
||||
if box.y + box.h/2 < Screen:getHeight()*0.3 then
|
||||
self.region.y = box.y + box.h
|
||||
self.region.h = Screen:getHeight() - box.y - box.h
|
||||
self.align = "top"
|
||||
else
|
||||
elseif box.y + box.h/2 > Screen:getHeight()*0.7 then
|
||||
self.region.y = 0
|
||||
self.region.h = box.y
|
||||
self.align = "bottom"
|
||||
|
||||
Reference in New Issue
Block a user