Custom layouts now support ALL options!

dev
Andy Meneely 2014-07-29 14:33:34 -04:00
parent b0e65d3783
commit fad0f93e4a
2 changed files with 4 additions and 2 deletions

View File

@ -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."

View File

@ -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