Sha256: 1b5f2ab7439f15be47fded0dc98da2cb4e1cad7852a50dca91fb4154160ea4de

Contents?: true

Size: 642 Bytes

Versions: 4

Compression:

Stored size: 642 Bytes

Contents

# frozen_string_literal: true
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

4 entries across 4 versions & 1 rubygems

Version Path
shoes-swt-4.0.0.pre12 lib/shoes/swt/common/update_position.rb
shoes-swt-4.0.0.pre11 lib/shoes/swt/common/update_position.rb
shoes-swt-4.0.0.pre10 lib/shoes/swt/common/update_position.rb
shoes-swt-4.0.0.pre9 lib/shoes/swt/common/update_position.rb