Sha256: 1396ffba78f1722f3fe9ec1afbb6d59045a1700338fea64eb1fa3e2b7c3da494

Contents?: true

Size: 507 Bytes

Versions: 6

Compression:

Stored size: 507 Bytes

Contents

#
# This thing catches styles from the collection element
# and adjusts the layout settings for them
#
class UnderOs::UI::Collection::Styles
  def self.build(collection, stylesheet)
    item = UnderOs::UI::Collection::Item.for(collection, stylesheet)

    collection.layout.item_size     = item.size
    collection.layout.items_spacing = item.style.marginLeft + item.style.marginRight
    collection.layout.rows_spacing  = item.style.marginTop  + item.style.marginBottom

    # TODO header/footer
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
under-os-ui-1.4.0 lib/under_os/ui/collection/styles.rb
under-os-1.3.0 lib/under_os/ui/collection/styles.rb
under-os-1.2.1 lib/under_os/ui/collection/styles.rb
under-os-1.2.0 lib/under_os/ui/collection/styles.rb
under-os-1.1.0 lib/under_os/ui/collection/styles.rb
under-os-1.0.0 lib/under_os/ui/collection/styles.rb