mirror of
https://github.com/koreader/koreader.git
synced 2025-12-24 12:14:05 +01:00
Dispatcher: Allow custom intensity/warmth gesture to be setup in gesture
distance mode, like the default edge swipe, and not only with a fixed increment. Document the behavior in a slightly less confusing way.
This commit is contained in:
@@ -98,11 +98,11 @@ local settingsList = {
|
||||
show_frontlight_dialog = {category="none", event="ShowFlDialog", title=_("Show frontlight dialog"), screen=true, condition=Device:hasFrontlight()},
|
||||
toggle_frontlight = {category="none", event="ToggleFrontlight", title=_("Toggle frontlight"), screen=true, condition=Device:hasFrontlight()},
|
||||
set_frontlight = {category="absolutenumber", event="SetFlIntensity", min=0, max=Device:getPowerDevice().fl_max, title=_("Set frontlight brightness"), screen=true, condition=Device:hasFrontlight()},
|
||||
increase_frontlight = {category="incrementalnumber", event="IncreaseFlIntensity", min=1, max=Device:getPowerDevice().fl_max, title=_("Increase frontlight brightness"), screen=true, condition=Device:hasFrontlight()},
|
||||
decrease_frontlight = {category="incrementalnumber", event="DecreaseFlIntensity", min=1, max=Device:getPowerDevice().fl_max, title=_("Decrease frontlight brightness"), screen=true, condition=Device:hasFrontlight()},
|
||||
increase_frontlight = {category="incrementalnumber", event="IncreaseFlIntensity", min=0, max=Device:getPowerDevice().fl_max, title=_("Increase frontlight brightness"), screen=true, condition=Device:hasFrontlight()},
|
||||
decrease_frontlight = {category="incrementalnumber", event="DecreaseFlIntensity", min=0, max=Device:getPowerDevice().fl_max, title=_("Decrease frontlight brightness"), screen=true, condition=Device:hasFrontlight()},
|
||||
set_frontlight_warmth = {category="absolutenumber", event="SetFlWarmth", min=0, max=100, title=_("Set frontlight warmth"), screen=true, condition=Device:hasNaturalLight()},
|
||||
increase_frontlight_warmth = {category="incrementalnumber", event="IncreaseFlWarmth", min=1, max=Device:getPowerDevice().fl_warmth_max, title=_("Increase frontlight warmth"), screen=true, condition=Device:hasNaturalLight()},
|
||||
decrease_frontlight_warmth = {category="incrementalnumber", event="DecreaseFlWarmth", min=1, max=Device:getPowerDevice().fl_warmth_max, title=_("Decrease frontlight warmth"), screen=true, condition=Device:hasNaturalLight(), separator=true},
|
||||
increase_frontlight_warmth = {category="incrementalnumber", event="IncreaseFlWarmth", min=0, max=Device:getPowerDevice().fl_warmth_max, title=_("Increase frontlight warmth"), screen=true, condition=Device:hasNaturalLight()},
|
||||
decrease_frontlight_warmth = {category="incrementalnumber", event="DecreaseFlWarmth", min=0, max=Device:getPowerDevice().fl_warmth_max, title=_("Decrease frontlight warmth"), screen=true, condition=Device:hasNaturalLight(), separator=true},
|
||||
night_mode = {category="none", event="ToggleNightMode", title=_("Toggle night mode"), screen=true},
|
||||
set_night_mode = {category="string", event="SetNightMode", title=_("Set night mode"), screen=true, args={true, false}, toggle={_("on"), _("off")}, separator=true},
|
||||
----
|
||||
@@ -825,7 +825,7 @@ function Dispatcher:_addItem(caller, menu, location, settings, section)
|
||||
value_hold_step = 5,
|
||||
value_max = settingsList[k].max,
|
||||
title_text = Dispatcher:getNameFromItem(k, location[settings], true),
|
||||
info_text = _([[If called by a gesture the amount of the gesture will be used]]),
|
||||
info_text = _([[When set to 0, the gesture's distance (if any) is used]]),
|
||||
ok_always_enabled = true,
|
||||
callback = function(spin)
|
||||
if location[settings] == nil then
|
||||
|
||||
Reference in New Issue
Block a user