mirror of
https://github.com/zhigang1992/rmq.git
synced 2026-04-30 21:52:33 +08:00
Fixed issue with changing content_right_margin on grid
This commit is contained in:
@@ -148,6 +148,10 @@ module RubyMotionQuery
|
|||||||
@content_left_margin = value
|
@content_left_margin = value
|
||||||
clear_cache
|
clear_cache
|
||||||
end
|
end
|
||||||
|
def content_right_margin=(value)
|
||||||
|
@content_right_margin = value
|
||||||
|
clear_cache
|
||||||
|
end
|
||||||
def content_top_margin=(value)
|
def content_top_margin=(value)
|
||||||
@content_top_margin = value
|
@content_top_margin = value
|
||||||
clear_cache
|
clear_cache
|
||||||
|
|||||||
@@ -6,10 +6,10 @@ require "ruby_motion_query/version"
|
|||||||
Gem::Specification.new do |spec|
|
Gem::Specification.new do |spec|
|
||||||
spec.name = 'ruby_motion_query'
|
spec.name = 'ruby_motion_query'
|
||||||
spec.summary = 'RubyMotionQuery - RMQ'
|
spec.summary = 'RubyMotionQuery - RMQ'
|
||||||
spec.description = 'RubyMotionQuery - RMQ - A fast, non-magical, non-polluting, jQuery-like library for RubyMotion'
|
spec.description = 'RubyMotionQuery - RMQ - A fast, non-magical, non-polluting, jQuery-like front-end library for RubyMotion'
|
||||||
spec.authors = ["Todd Werth", "InfiniteRed"]
|
spec.authors = ["Todd Werth", "InfiniteRed"]
|
||||||
spec.email = 'todd@infinitered.com'
|
spec.email = 'todd@infinitered.com'
|
||||||
spec.homepage = "http://infinitered.com/rmq"
|
spec.homepage = "http://rubymotionquery.com"
|
||||||
spec.version = RubyMotionQuery::VERSION
|
spec.version = RubyMotionQuery::VERSION
|
||||||
spec.license = 'MIT'
|
spec.license = 'MIT'
|
||||||
|
|
||||||
|
|||||||
23
spec/grid.rb
23
spec/grid.rb
@@ -17,6 +17,29 @@ describe 'grid' do
|
|||||||
rmq.app.grid.should != nil
|
rmq.app.grid.should != nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
should 'be able to change apps default grid' do
|
||||||
|
rmq.app.grid.tap do |g|
|
||||||
|
g.content_left_margin = 1
|
||||||
|
g.content_right_margin = 2
|
||||||
|
g.content_top_margin = 3
|
||||||
|
g.content_bottom_margin = 4
|
||||||
|
g.num_columns = 5
|
||||||
|
g.column_gutter = 6
|
||||||
|
g.num_rows = 7
|
||||||
|
g.row_gutter = 8
|
||||||
|
|
||||||
|
g.content_left_margin.should == 1
|
||||||
|
g.content_right_margin.should == 2
|
||||||
|
g.content_top_margin.should == 3
|
||||||
|
g.content_bottom_margin.should == 4
|
||||||
|
|
||||||
|
g.num_columns.should == 5
|
||||||
|
g.column_gutter.should == 6
|
||||||
|
g.num_rows.should == 7
|
||||||
|
g.row_gutter.should == 8
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
should 'clear cache when changing settings' do
|
should 'clear cache when changing settings' do
|
||||||
was_row = @grid['1:3']
|
was_row = @grid['1:3']
|
||||||
was_column = @grid['a:d']
|
was_column = @grid['a:d']
|
||||||
|
|||||||
Reference in New Issue
Block a user