restrict dictionary window inside of screen especially in landscape mode

This should fix #2020.
pull/2085/head
chrox 8 years ago
parent cf3c91d92e
commit 40858c670a

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