Sha256: db407809c66ab4d5a0dfb4fc28b4c88e768fe43911ce8fa798cacf065d8b7a61

Contents?: true

Size: 680 Bytes

Versions: 1

Compression:

Stored size: 680 Bytes

Contents

# frozen_string_literal: true

class Shoes
  module Mock
    class Button
      include Shoes::Mock::CommonMethods
      include Shoes::Mock::Clickable

      def initialize(dsl, _parent)
        # For whatever reason the SWT button sets sizes back during initialize
        # and at least one test (for the ask dialog which runs a full Shoes.app)
        # relies on that sizing being set for positioning logic to run.
        #
        # Best I can tell, it doesn't matter *what* the values are, as long as
        # they're there.
        dsl.width  = 0 unless dsl.width
        dsl.height = 0 unless dsl.height
      end

      def enabled(_value)
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.rc1 lib/shoes/mock/button.rb