Module: Shoes::Swt::Common::UpdatePosition

Defined in:
shoes-swt/lib/shoes/swt/common/update_position.rb

Instance Method Summary collapse

Instance Method Details

#update_positionObject

Updates the position of this object. This object does not have its own painter, so we need to update the position manually.


9
10
11
12
13
14
15
16
17
# File 'shoes-swt/lib/shoes/swt/common/update_position.rb', line 9

def update_position
  return if @real.disposed?

  @real.set_location dsl.element_left, dsl.element_top

  # Why update size too? On Mac, SWT snaps sizing to defaults after
  # setting location for reasons I've yet to understand. #1323
  @real.set_size dsl.element_width, dsl.element_height
end