[macruby-changes] [613] MacRuby/trunk/lib/hotcocoa/layout_view.rb

source_changes at macosforge.org source_changes at macosforge.org
Fri Sep 19 23:04:43 PDT 2008


Revision: 613
          http://trac.macosforge.org/projects/ruby/changeset/613
Author:   lsansonetti at apple.com
Date:     2008-09-19 23:04:43 -0700 (Fri, 19 Sep 2008)
Log Message:
-----------
consider padding flags when calculating the other dimension expandable size

Modified Paths:
--------------
    MacRuby/trunk/lib/hotcocoa/layout_view.rb

Modified: MacRuby/trunk/lib/hotcocoa/layout_view.rb
===================================================================
--- MacRuby/trunk/lib/hotcocoa/layout_view.rb	2008-09-20 03:16:38 UTC (rev 612)
+++ MacRuby/trunk/lib/hotcocoa/layout_view.rb	2008-09-20 06:04:43 UTC (rev 613)
@@ -390,9 +390,9 @@
       
       if (vertical ? options.expand_width? : options.expand_height?)
         if vertical
-          view_frame.size.width = view_size.width - (2 * @margin)
+          view_frame.size.width = view_size.width - (2 * @margin) - options.right_padding - options.left_padding
         else
-          view_frame.size.height = view_size.height - (2 * @margin)
+          view_frame.size.height = view_size.height - (2 * @margin) - options.top_padding - options.bottom_padding
         end
       else
         case options.align
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080919/ad01a11c/attachment.html 


More information about the macruby-changes mailing list