Checkbutton: remove unused (#8108)

* Inputtext checkbutton: add "parent"
reviewable/pr8115/r1
hius07 3 years ago committed by GitHub
parent 1c739f1d54
commit 66b644295a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,6 @@ local TextBoxWidget = require("ui/widget/textboxwidget")
local UIManager = require("ui/uimanager")
local VerticalGroup = require("ui/widget/verticalgroup")
local VerticalSpan = require("ui/widget/verticalspan")
local Screen = Device.screen
local CheckButton = InputContainer:new{
callback = nil,
@ -35,15 +34,8 @@ local CheckButton = InputContainer:new{
enabled = true,
face = Font:getFace("smallinfofont"),
background = Blitbuffer.COLOR_WHITE,
overlap_align = "right",
text = nil,
toggle_text = nil,
max_width = nil, -- must be set by the caller
window = nil,
padding = Screen:scaleBySize(5),
margin = Screen:scaleBySize(5),
bordersize = Screen:scaleBySize(3),
}
function CheckButton:init()

@ -391,6 +391,7 @@ function InputText:initTextBox(text, char_added)
if self.is_password_type and self.show_password_toggle then
self._check_button = self._check_button or CheckButton:new{
text = _("Show password"),
parent = self,
max_width = self.width,
callback = function()
if self.text_type == "text" then
@ -402,10 +403,6 @@ function InputText:initTextBox(text, char_added)
end
self:setText(self:getText(), true)
end,
padding = self.padding,
margin = self.margin,
bordersize = self.bordersize,
}
self._password_toggle = FrameContainer:new{
bordersize = 0,

Loading…
Cancel
Save