2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00

Merge pull request #437 from chrox/master

fix koreader-base reference is not a tree
This commit is contained in:
Qingping Hou 2014-01-06 22:34:04 -08:00
commit 973d56fffb
2 changed files with 5 additions and 5 deletions

View File

@ -33,20 +33,20 @@ end
function ReaderFrontLight:onAdjust(arg, ges)
local powerd = Device:getPowerDevice()
if powerd.intensity ~= nil then
if powerd.flIntensity ~= nil then
local rel_proportion = ges.distance / Screen:getWidth()
local delta_int = self.steps[math.ceil(#self.steps*rel_proportion)] or self.steps[#self.steps]
local msg = nil
if ges.direction == "north" then
msg = _("Increase front light intensity to ")
powerd:setIntensity(powerd.intensity + delta_int)
powerd:setIntensity(powerd.flIntensity + delta_int)
elseif ges.direction == "south" then
msg = _("Decrease front light intensity to ")
powerd:setIntensity(powerd.intensity - delta_int)
powerd:setIntensity(powerd.flIntensity - delta_int)
end
if msg ~= nil then
UIManager:show(Notification:new{
text = msg..powerd.intensity,
text = msg..powerd.flIntensity,
timeout = 1
})
end

@ -1 +1 @@
Subproject commit f7645b0564ff461c43abe6f24452072551fbfcac
Subproject commit fc05afc03370d7cf14537c45bba46177b341572f