uh-layout 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27063bf0c7da809ea430cc4de1595149868766db
4
- data.tar.gz: 3770a238eb847d0f214d4560cc28b11177443ea1
3
+ metadata.gz: 107a40b97e69793129c9dda9f1a545bb65575884
4
+ data.tar.gz: e00a2106bed9315fd3f01de4e3155ae6dcea46ef
5
5
  SHA512:
6
- metadata.gz: c58a7649238a4fad66661ece07040c51359d0afdbb485fea97a2352c2def84634c4a2b2b1bd7b5d6d3eceefa000be944d5eee87f83c84ca01785e3df2bca1f88
7
- data.tar.gz: 1fe67fcbd4de7cc6525d7822e83da41c13b6d80b8a002cdf4e7d7904c937a50a827372c09f40c8977cadd3e320d665dcc79a709772035f76fdfcb0fbbc350789
6
+ metadata.gz: 34e2bfb33ebc482e4a7227079fdf6917066dfc3525b8da64881f6b0ba48ff41f1e1518c13d64b4187138c99f433d273fa4ddd89fcb6d36258db4ad0b09ef60df
7
+ data.tar.gz: e1144c56b9e033375237a30db33f848a99e6df8dddaa93b8465d2151d4624f391b7427b802fccc09e06c4a87d2fa5eab6c1c54996dad2b312defe9dc094ca794
@@ -11,7 +11,9 @@ module Uh
11
11
  screen.views.each do |view|
12
12
  m << " %s%s\n" % [screen.current_view?(view) ? '*' : ' ', view]
13
13
  view.columns.each do |column|
14
- m << " %s%s\n" % [view.current_column?(column) ? '*' : ' ', column]
14
+ m << " %s%s\n" % [
15
+ view.current_column?(column) ? '*' : ' ', column
16
+ ]
15
17
  column.clients.each do |client|
16
18
  m << " %s%s\n" % [
17
19
  column.current_client?(client) ? '*' : ' ',
@@ -5,9 +5,9 @@ module Uh
5
5
  def register(layout, display)
6
6
  display.screens.each do |screen|
7
7
  layout.screens << scr = Screen.new(screen.id, screen.geo)
8
- layout.widgets << bar = Bar.new(display, scr, layout.colors).show.focus
9
- bar.on_update do
10
- bar.active = layout.current_screen? scr
8
+ bar = Bar.new(display, scr, layout.colors).tap do |b|
9
+ layout.widgets << b.show.focus
10
+ b.on_update { bar.active = layout.current_screen? scr }
11
11
  end
12
12
  scr.height = scr.height - bar.height
13
13
  end
@@ -10,9 +10,9 @@ module Uh
10
10
  attr_reader :id, :views, :geo
11
11
 
12
12
  def initialize(id, geo)
13
- @id = id
14
- @geo = geo.dup
15
- @views = Container.new([View.new('1', @geo)])
13
+ @id = id
14
+ @geo = geo.dup
15
+ @views = Container.new([View.new('1', @geo)])
16
16
  end
17
17
 
18
18
  def to_s
@@ -1,5 +1,5 @@
1
1
  module Uh
2
2
  class Layout
3
- VERSION = '0.4.0'.freeze
3
+ VERSION = '0.4.1'.freeze
4
4
  end
5
5
  end
data/lib/uh/layout.rb CHANGED
@@ -189,13 +189,18 @@ module Uh
189
189
  end
190
190
 
191
191
  def find_view_or_create(view_id)
192
- current_screen.views.find { |e| e.id == view_id } or View.new(view_id, current_screen.geo).tap do |view|
192
+ current_screen.views.find do
193
+ |e| e.id == view_id
194
+ end or View.new(view_id, current_screen.geo).tap do |view|
193
195
  current_screen.views << view
194
196
  end
195
197
  end
196
198
 
197
199
  def client_mover_for_current_view
198
- ClientColumnMover.new(current_view.columns, current_view.columns_max_count?)
200
+ ClientColumnMover.new(
201
+ current_view.columns,
202
+ current_view.columns_max_count?
203
+ )
199
204
  end
200
205
  end
201
206
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uh-layout
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thibault Jouan