Sha256: f7fc6181d1a6c0580ab2aa9845a3b849b1a4aabb323bb3ba3d787c6f76bc8713

Contents?: true

Size: 449 Bytes

Versions: 1

Compression:

Stored size: 449 Bytes

Contents

# frozen_string_literal: true

class Shoes
  class Progress < Common::UIElement
    style_with :common_styles, :dimensions, :fraction
    STYLES = { fraction: 0.0 }.freeze

    def after_initialize(*_)
      @gui.fraction = @style[:fraction]
      update_visibility
    end

    def handle_block(*_)
      # No-op since we're not clickable
    end

    def fraction=(value)
      style(fraction: value)
      @gui.fraction = value
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shoes-core-4.0.0.rc1 lib/shoes/progress.rb