[UX] Add fine tune buttons to horizontal margins (#5303)

Similar to top and bottom margins I add fine tune buttons to L/R margins.
pull/5311/head
Robert 5 years ago committed by Frans de Jonge
parent 1b17ce8ba0
commit b038fa3046

@ -64,6 +64,7 @@ Note that this may not be ensured under some conditions: in scroll mode, when a
name = "h_page_margins",
name_text = S.H_PAGE_MARGINS,
buttonprogress = true,
fine_tune = true,
values = {
DCREREADER_CONFIG_H_MARGIN_SIZES_SMALL,
DCREREADER_CONFIG_H_MARGIN_SIZES_MEDIUM,

@ -965,13 +965,28 @@ function ConfigDialog:onConfigFineTuneChoose(values, name, event, args, events,
local value
if direction == "-" then
value = self.configurable[name] or values[1]
value = value - 1
if value < 0 then
value = 0
if type(value) == "table" then
for i=1, #value do
value[i] = value[i] - 1
if value[i] < 0 then
value[i] = 0
end
end
else
value = value - 1
if value < 0 then
value = 0
end
end
else
value = self.configurable[name] or values[#values]
value = value + 1
if type(value) == "table" then
for i=1, #value do
value[i] = value[i] + 1
end
else
value = value + 1
end
end
self:onConfigChoice(name, value)
end

Loading…
Cancel
Save