Module: Uh::Layout::Registrant

Defined in:
lib/uh/layout/registrant.rb

Class Method Summary collapse

Class Method Details

.register(layout, display) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
# File 'lib/uh/layout/registrant.rb', line 5

def register(layout, display)
  display.screens.each do |screen|
    layout.screens << scr = Screen.new(screen.id, screen.geo)
    layout.widgets << bar = Bar.new(display, scr, layout.colors).show.focus
    bar.on_update do
      bar.active = layout.current_screen? scr
    end
    scr.height = scr.height - bar.height
  end
  layout.update_widgets
end