Module: VER::TilingLayout::HorizontalTiling

Extended by:
CommonTiling
Defined in:
lib/ver/layout/tiling/horizontal.rb

Constant Summary

Constants included from CommonTiling

CommonTiling::DEFAULT

Class Method Summary collapse

Methods included from CommonTiling

apply, apply_hidden, evolve, prepare

Class Method Details

.apply_masters(windows, center, step = 1.0 / windows.size) ⇒ Object



8
9
10
11
12
13
# File 'lib/ver/layout/tiling/horizontal.rb', line 8

def apply_masters(windows, center, step = 1.0 / windows.size)
  windows.each_with_index do |window, idx|
    evolve(window, relx: (step * idx), rely: 0.0,
           relheight: center, relwidth: step)
  end
end

.apply_stacked(windows, center, step = 1.0 / windows.size) ⇒ Object



15
16
17
18
19
20
21
22
# File 'lib/ver/layout/tiling/horizontal.rb', line 15

def apply_stacked(windows, center, step = 1.0 / windows.size)
  relheight = 1.0 - center

  windows.each_with_index do |window, idx|
    evolve(window, relx: (step * idx), rely: center,
           relheight: relheight, relwidth: step)
  end
end