Custom layouts now support ALL options!
parent
b0e65d3783
commit
fad0f93e4a
|
|
@ -29,8 +29,8 @@ module Squib
|
||||||
unless opts[:layout].nil?
|
unless opts[:layout].nil?
|
||||||
entry = @layout[opts[:layout].to_s]
|
entry = @layout[opts[:layout].to_s]
|
||||||
unless entry.nil?
|
unless entry.nil?
|
||||||
%w(x y width height).each do |p|
|
entry.each do |key, value|
|
||||||
opts[p.to_sym] ||= entry[p]
|
opts[key.to_sym] ||= entry[key]
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
logger.warn "Layout entry #{opts[:layout]} does not exist."
|
logger.warn "Layout entry #{opts[:layout]} does not exist."
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ title:
|
||||||
y: 50
|
y: 50
|
||||||
width: 625
|
width: 625
|
||||||
height: 150
|
height: 150
|
||||||
|
align: !ruby/symbol center
|
||||||
|
hint: !ruby/symbol cyan
|
||||||
subtitle:
|
subtitle:
|
||||||
x: 125
|
x: 125
|
||||||
y: 150
|
y: 150
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue