Sha256: d6db9b91b8dc1333c831731ec921b8f25c304ddfee7af8f4f0026dde47ecedf8

Contents?: true

Size: 608 Bytes

Versions: 6

Compression:

Stored size: 608 Bytes

Contents

# frozen_string_literal: true

module GirFFIGtk
  # Overrides for GtkImage methods
  module ImageOverrides
    def set_from_gicon(icon, size)
      super icon, Gtk::IconSize.to_int(size)
    end
  end

  # Overrides for GtkImage class methods
  module ImageClassOverrides
    def new_from_icon_name(icon_name, size)
      super icon_name, Gtk::IconSize.to_int(size)
    end

    def new_from_gicon(icon, size)
      super icon, Gtk::IconSize.to_int(size)
    end
  end
end

Gtk.load_class :Image

Gtk::Image.prepend GirFFIGtk::ImageOverrides
Gtk::Image.singleton_class.prepend GirFFIGtk::ImageClassOverrides

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gir_ffi-gtk-0.16.0 lib/gir_ffi-gtk/image.rb
gir_ffi-gtk-0.15.1 lib/gir_ffi-gtk/image.rb
gir_ffi-gtk-0.15.0 lib/gir_ffi-gtk/image.rb
gir_ffi-gtk-0.14.1 lib/gir_ffi-gtk/image.rb
gir_ffi-gtk-0.14.0 lib/gir_ffi-gtk/image.rb
gir_ffi-gtk-0.13.1 lib/gir_ffi-gtk/image.rb