Merge pull request #437 from chrox/master

fix koreader-base reference is not a tree
pull/440/head
Qingping Hou 11 years ago
commit 973d56fffb

@ -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
Loading…
Cancel
Save