Shoe centering

Is it possible to concentrate the contents of the stream in shoes?

I know that a paragraph can be centered like this:

para 'Centred paragrpah', :align=>'center'

However, this does not work with threads:

flow(:align=>'center') do
end

Errors do not occur, but the contents remain valid.

+3
source share
1 answer

Not quite sure. What in the stream are you trying to focus on? You can try margin left trick according to HTML and CSS.

This gives a stream with left, center, and right alignment text that remains centered in the window as it changes:

Shoes.app do
flow   do
    style(:margin_left => '50%', :left => '-25%')
        border blue
        para "Some left justified text\n", :align => 'left'
        para "Some centred text\n", :align => 'center'
        para "some right justified text\n", :align => 'right'
end
end
+2
source

Source: https://habr.com/ru/post/1722870/


All Articles