18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/twterm/tab/preferences/control.rb', line 18
def image
drawable_items.map.with_index do |item, i|
curr = scroller.current_index?(i)
cursor = Image.cursor(2, curr)
options = Image.toggle_switch(['traditional', 'natural'], app.preferences[:control, item])
desc =
case item
when :scroll_direction
= Image.string('Scroll direction')
body = Image.string(' ') - options
cursor - Image.whitespace - ( | body)
end
end
.intersperse(Image.blank_line)
.reduce(Image.empty) { |acc, x| acc | x }
end
|