mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[UX] Add fine tune in contrast (#5413)
This commit is contained in:
@@ -42,16 +42,41 @@ function optionsutil.showValues(configurable, option, prefix)
|
||||
current = arg_table[current]
|
||||
end
|
||||
if option.labels and option.values then
|
||||
for i=1,#option.labels do
|
||||
if default == option.values[i] then
|
||||
default = option.labels[i]
|
||||
break
|
||||
if option.more_options_param and option.more_options_param.value_table then
|
||||
if option.more_options_param.args_table then
|
||||
for k,v in pairs(option.more_options_param.args_table) do
|
||||
if v == current then
|
||||
current = k
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
for i=1,#option.labels do
|
||||
if current == option.values[i] then
|
||||
current = option.labels[i]
|
||||
break
|
||||
current = option.more_options_param.value_table[current]
|
||||
if default ~= _("not set") then
|
||||
if option.more_options_param.args_table then
|
||||
for k,v in pairs(option.more_options_param.args_table) do
|
||||
if v == default then
|
||||
default = k
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
default = option.more_options_param.value_table[default]
|
||||
end
|
||||
else
|
||||
if default ~= _("not set") then
|
||||
for i=1,#option.labels do
|
||||
if default == option.values[i] then
|
||||
default = option.labels[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
for i=1,#option.labels do
|
||||
if current == option.values[i] then
|
||||
current = option.labels[i]
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user