[macruby-changes] [358] MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb
source_changes at macosforge.org
source_changes at macosforge.org
Thu Jul 10 11:56:46 PDT 2008
Revision: 358
http://trac.macosforge.org/projects/ruby/changeset/358
Author: lsansonetti at apple.com
Date: 2008-07-10 11:56:46 -0700 (Thu, 10 Jul 2008)
Log Message:
-----------
removed tabulations
Modified Paths:
--------------
MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb
Modified: MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb
===================================================================
--- MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb 2008-07-10 18:56:42 UTC (rev 357)
+++ MacRuby/trunk/sample-macruby/HotCocoa/layout_view.rb 2008-07-10 18:56:46 UTC (rev 358)
@@ -30,8 +30,8 @@
strsize = str.sizeWithAttributes @attributes
point = [
(rect.size.width / 2.0) - (strsize.width / 2.0),
- (rect.size.height / 2.0) - (strsize.height / 2.0)
- ]
+ (rect.size.height / 2.0) - (strsize.height / 2.0)
+ ]
@number.to_s.drawAtPoint point, withAttributes:@attributes
end
@@ -59,7 +59,7 @@
pane.view << button(:title => "Vertical", :type => :switch, :state => :on, :layout => {:start => false}) do |b|
b.on_action do |b|
- views.each { |v| v.reset_size }
+ views.each { |v| v.reset_size }
win.view.mode = b.on? ? :vertical : :horizontal
end
end
@@ -73,15 +73,15 @@
selected_view = views[p.items.selected_index]
options = selected_view.layout
expand_b.state = options.expand? ? :on : :off
- left_padding_s.intValue = options.left_padding
- right_padding_s.intValue = options.right_padding
- top_padding_s.intValue = options.top_padding
- bottom_padding_s.intValue = options.bottom_padding
- other_p.items.selected = case options.other
- when :align_head then 0
- when :align_center then 1
- when :align_tail then 2
- when :fill then 3
+ left_padding_s.intValue = options.left_padding
+ right_padding_s.intValue = options.right_padding
+ top_padding_s.intValue = options.top_padding
+ bottom_padding_s.intValue = options.bottom_padding
+ other_p.items.selected = case options.other
+ when :align_head then 0
+ when :align_center then 1
+ when :align_tail then 2
+ when :fill then 3
end
end
@@ -123,10 +123,10 @@
view << label(:text => 'Other', :layout => {:other => :align_center})
view << popup(:items => ['Align Head', 'Align Center', 'Align Tail', 'Fill'], :layout => {:expand => true, :other => :align_center}) do |p|
p.on_action do |x|
- selected_view.reset_size
- selected_view.layout.other = x.items.selected.downcase.tr(' ', '_').intern
- end
- other_p = p
+ selected_view.reset_size
+ selected_view.layout.other = x.items.selected.downcase.tr(' ', '_').intern
+ end
+ other_p = p
end
end
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080710/ae529b92/attachment-0001.html
More information about the macruby-changes
mailing list