cre: add Word Gap setting to bottom config panel (#4026)

Maps to crengine's Space Condensing feature (named Word Gap
as a similar feature is named for PDF)
This commit is contained in:
Robert
2018-06-30 16:55:43 +02:00
committed by poire-z
parent 27dfa30181
commit d29a65b96e
7 changed files with 45 additions and 19 deletions

View File

@@ -47,12 +47,13 @@ function ToggleSwitch:init()
-- Item count per row
self.n_pos = math.ceil(#self.toggle / self.row_count)
self.position = nil
local border_size = Size.border.thin
self.toggle_frame = FrameContainer:new{
background = Blitbuffer.COLOR_WHITE,
color = Blitbuffer.COLOR_GREY,
radius = Size.radius.window,
bordersize = Size.border.thin,
bordersize = border_size,
padding = Size.padding.small,
dim = not self.enabled,
}
@@ -63,7 +64,7 @@ function ToggleSwitch:init()
end
local center_dimen = Geom:new{
w = self.width / self.n_pos,
w = (self.width - border_size*(2*self.n_pos-2)) / self.n_pos,
h = self.height / self.row_count,
}
local button_width = math.floor(self.width / self.n_pos)
@@ -88,7 +89,7 @@ function ToggleSwitch:init()
color = Blitbuffer.COLOR_GREY,
margin = 0,
radius = Size.radius.window,
bordersize = Size.border.thin,
bordersize = border_size,
padding = 0,
content,
}