configdialog: fix toggle (#12104)

reviewable/pr12050/r1^2
hius07 3 months ago committed by GitHub
parent 0ae84642e2
commit 33ae788575
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -546,14 +546,12 @@ function ConfigOption:init()
local row_count = self.options[c].row_count or 1
local toggle_height = Screen:scaleBySize(self.options[c].height
or (30 * row_count))
local toggle, args = {}, {} -- keep options intact
local toggle = {} -- keep options intact
for i = 1, #self.options[c].toggle do
toggle[i] = self.options[c].toggle[i]
args[i] = self.options[c].args[i]
end
if self.options[c].more_options then
table.insert(toggle, "")
table.insert(args, "")
end
local switch = ToggleSwitch:new{
width = math.min(max_toggle_width, toggle_width),
@ -565,7 +563,7 @@ function ConfigOption:init()
toggle = toggle,
alternate = self.options[c].alternate,
values = self.options[c].values,
args = args,
args = self.options[c].args,
event = self.options[c].event,
hide_on_apply = self.options[c].hide_on_apply,
config = self.config,

Loading…
Cancel
Save