Sha256: cf923d1613fb02152366e3926ae8676d1404484c1ea4363e7f9df5fcc1a4b209

Contents?: true

Size: 612 Bytes

Versions: 1

Compression:

Stored size: 612 Bytes

Contents

class Shoes
  module Swt
    module Common
      module UpdatePosition
        # Updates the position of this object. This object does not have its
        # own painter, so we need to update the position manually.
        def update_position
          unless @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
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre8 lib/shoes/swt/common/update_position.rb