Merge pull request #233 from thotypous/fl-toggle-clear

Add InputText:setText and avoid non-intuitive UI behavior after light toggle
pull/234/head
Huang Xin 11 years ago
commit 8eb195a42e

@ -69,6 +69,7 @@ function ReaderFrontLight:onShowFlDialog()
text = _("Toggle"),
enabled = true,
callback = function()
self.fl_dialog.input:setText("")
fl:toggle()
end,
},

@ -114,6 +114,12 @@ function InputText:getText()
return self.text
end
function InputText:setText(text)
self:StringToCharlist(text)
self:initTextBox()
UIManager:setDirty(self.parent, "partial")
end
function InputText:StringToCharlist(text)
if text == nil then return end
-- clear

Loading…
Cancel
Save