Changeset 28888

Show
Ignore:
Timestamp:
01/23/09 12:25:36 (4 years ago)
Author:
isaisstillalive
Message:
  • 自分の現在のサイズの取得方法を間違えていたので修正。
  • テストをHiddenWindowを使うように変更。
Location:
lang/ruby/ruwin
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • lang/ruby/ruwin/lib/ruwin/control.rb

    r28884 r28888  
    2020    def parent_resized parent_width, parent_height 
    2121      return unless self.right || self.bottom 
    22       width  = self.right  ? (parent_width  - self.right)  : w 
    23       height = self.bottom ? (parent_height - self.bottom) : h 
    24       move x, y, width, height 
     22      size = clientrect 
     23      size[2] = parent_width  - self.right  if self.right 
     24      size[3] = parent_height - self.bottom if self.bottom 
     25       
     26      move *size 
    2527    end 
    2628  end 
  • lang/ruby/ruwin/test/ruwin/test_control.rb

    r28884 r28888  
    1616  def test_new 
    1717    klass = Class.new(Ruwin::Control) 
    18     window = Ruwin::Component.new 
     18    window = HiddenWindow.new 
    1919    instance = klass.new(window) 
    2020    assert_equal 0,                   instance.style&WS_CLIPSIBLINGS