Class: Gtk::IconPaintable

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Constructor Details

#initialize(file, size, scale) ⇒ Gtk::IconPaintable

Creates a GtkIconPaintable for a file with a given size and scale.

The icon can then be rendered by using it as a GdkPaintable.

Parameters:

  • file (Gio::File) —

    a GFile

  • size (Integer) —

    desired icon size, in application pixels

  • scale (Integer) —

    the desired scale

Instance Method Details

#file ⇒ Gio::File

The file representing the icon, if any.

Returns:

  • (Gio::File) —

    file

#file=(file) ⇒ Gio::File

The file representing the icon, if any.

Parameters:

  • file (Gio::File)

Returns:

  • (Gio::File) —

    file

  • (Gio::File) —

    file

#icon_name ⇒ String

The icon name that was chosen during lookup.

Returns:

  • (String) —

    icon-name

#icon_name=(icon_name) ⇒ String

The icon name that was chosen during lookup.

Parameters:

  • icon_name (String)

Returns:

  • (String) —

    icon-name

  • (String) —

    icon-name

#is_symbolic ⇒ Boolean

Checks if the icon is symbolic or not.

This currently uses only the file name and not the file contents
for determining this. This behaviour may change in the future.

Returns:

  • (Boolean) —

    true if the icon is symbolic, false otherwise

#is_symbolic=(is_symbolic) ⇒ Boolean

Whether the icon is symbolic or not.

Parameters:

  • is_symbolic (Boolean)

Returns:

  • (Boolean) —

    is-symbolic

  • (Boolean) —

    is-symbolic

#is_symbolic? ⇒ Boolean

Whether the icon is symbolic or not.

Returns:

  • (Boolean) —

    is-symbolic

#scale ⇒ Integer

Returns scale.

Returns:

  • (Integer) —

    scale

#scale=(scale) ⇒ Integer

Parameters:

  • scale (Integer)

Returns:

  • (Integer) —

    scale

  • (Integer) —

    scale

#size ⇒ Integer

Returns size.

Returns:

  • (Integer) —

    size

#size=(size) ⇒ Integer

Parameters:

  • size (Integer)

Returns:

  • (Integer) —

    size

  • (Integer) —

    size