tweaks on config dialog for crereader

pull/431/head
chrox 11 years ago
parent 71b3e717cf
commit e21e017b8d

@ -37,9 +37,10 @@ local CreOptions = {
{ {
name = "line_spacing", name = "line_spacing",
name_text = S.LINE_SPACING, name_text = S.LINE_SPACING,
item_text = {S.DECREASE, S.INCREASE}, toggle = {S.DECREASE, S.INCREASE},
alternate = false,
args = {"decrease", "increase"}, args = {"decrease", "increase"},
default_arg = nil, default_arg = "decrease",
event = "ChangeLineSpace", event = "ChangeLineSpace",
}, },
{ {
@ -83,19 +84,17 @@ local CreOptions = {
{ {
name = "font_weight", name = "font_weight",
name_text = S.FONT_WEIGHT, name_text = S.FONT_WEIGHT,
item_text = {S.TOGGLE_BOLD}, toggle = {S.TOGGLE_BOLD},
-- args is indeed not used, we put here just to keep the
-- UI happy.
args = {1},
default_arg = nil, default_arg = nil,
event = "ToggleFontBolder", event = "ToggleFontBolder",
}, },
{ {
name = "font_gamma", name = "font_gamma",
name_text = S.GAMMA, name_text = S.GAMMA,
item_text = {S.DECREASE, S.INCREASE}, toggle = {S.DECREASE, S.INCREASE},
alternate = false,
args = {"decrease", "increase"}, args = {"decrease", "increase"},
default_arg = nil, default_arg = "increase",
event = "ChangeFontGamma", event = "ChangeFontGamma",
} }
} }

@ -268,6 +268,7 @@ function ReaderRolling:updatePos()
self.old_page = new_page self.old_page = new_page
self.ui:handleEvent(Event:new("UpdateToc")) self.ui:handleEvent(Event:new("UpdateToc"))
end end
UIManager.repaint_all = true
end end
function ReaderRolling:onChangeViewMode() function ReaderRolling:onChangeViewMode()

@ -103,6 +103,8 @@ function ToggleSwitch:togglePosition(position)
if self.n_pos == 2 and self.alternate ~= false then if self.n_pos == 2 and self.alternate ~= false then
self.position = (self.position+1)%self.n_pos self.position = (self.position+1)%self.n_pos
self.position = self.position == 0 and self.n_pos or self.position self.position = self.position == 0 and self.n_pos or self.position
elseif self.n_pos == 1 then
self.position = self.position == 1 and 0 or 1
else else
self.position = position self.position = position
end end

Loading…
Cancel
Save