Add InputText:setText and avoid non-intuitive UI behavior after light toggle

pull/233/head
Paulo Matias 11 years ago
parent 93f5e53ebb
commit 54636e9407

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