Merge pull request #2085 from chrox/fix_2020

restrict dictionary window inside of screen especially in landscape mode
pull/2088/head
Frans de Jonge 8 years ago committed by GitHub
commit 065f93c266

@ -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"

Loading…
Cancel
Save