Permalink
Browse files

Fixed a bug of slot size (height) and modified built-in manual. This …

…is a test snippet:

require 'green_shoes'
Shoes.app do
  flow do
    background green
    para 'hello', width: 100
    edit_line
    para 'hello ', width: 100
    image 'loogink.png', height: 20
    flow do
      para 'hello', width: 100
      image 'loogink.png', height: 20
    end
  end
end
  • Loading branch information...
1 parent 8fa5e68 commit 0d0ed7fbd92434e7d459011282922d64c3975d0e @ashbb committed Feb 23, 2012
Showing with 8 additions and 8 deletions.
  1. +1 −1 VERSION
  2. +3 −3 green_shoes.gemspec
  3. +2 −2 lib/shoes/helper_methods.rb
  4. +1 −1 static/manual-en.txt
  5. +1 −1 static/manual-ja.txt
View
2 VERSION
@@ -1 +1 @@
-1.1.355
+1.1.357
View
6 green_shoes.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "green_shoes"
- s.version = "1.1.355"
+ s.version = "1.1.357"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["ashbb"]
- s.date = "2012-02-13"
+ s.date = "2012-02-23"
s.description = "Green Shoes is one of colorful Shoes, written in pure Ruby with Ruby/GTK2."
s.email = "ashbbb@gmail.com"
s.executables = ["gshoes"]
@@ -299,7 +299,7 @@ Gem::Specification.new do |s|
]
s.homepage = "http://github.com/ashbb/green_shoes"
s.require_paths = ["lib"]
- s.rubygems_version = "1.8.11"
+ s.rubygems_version = "1.8.16"
s.summary = "Green Shoes"
if s.respond_to? :specification_version then
View
4 lib/shoes/helper_methods.rb
@@ -163,7 +163,7 @@ def self.contents_alignment slot
x, y = slot.left.to_i, slot.top.to_i
max = Struct.new(:top, :height).new
max.top, max.height = y, 0
- slot_height = 0
+ slot_height, slot_top = 0, y
slot.contents.each do |ele|
next if ele.is_a?(Basic) && ele.cleared && !ele.is_a?(Pattern)
@@ -179,7 +179,7 @@ def self.contents_alignment slot
max, flag = ele.positioning x, y, max
x, y = ele.left + ele.width, ele.top + ele.height
unless max == tmp
- slot_height = flag && !slot_height.zero? ? y : slot_height + max.height
+ slot_height = max.top + max.height - slot_top
end
end
slot_height
View
2 static/manual-en.txt
@@ -2325,7 +2325,7 @@ Creates a Title text block. Green Shoes styles these elements to 34 pixels high
=== video(path or url) » Shoes::Video ===
-Play some audio files.
+Embeds a movie or plays an audio.
=== window(styles) { ... } » Shoes::App ===
View
2 static/manual-ja.txt
@@ -2254,7 +2254,7 @@ Sup("superscript"の省略形)テキストの一部を作成します。
=== video(path or url) » Shoes::Video ===
-動画を埋め込みます。
+動画を埋め込みます。音声を再生します。
=== window(styles) { ... } » Shoes::App ===

0 comments on commit 0d0ed7f

Please sign in to comment.