Class: Gtk::IconPaintable

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

Overview

Contains information found when looking up an icon in GtkIconTheme.

GtkIconPaintable implements GdkPaintable.

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

  • scale (Integer)

    the desired scale

Instance Method Details

#fileGio::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_nameString

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_symbolicBoolean

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.

Note that to render a symbolic GtkIconPaintable properly (with recoloring), you have to set its icon name on a GtkImage.

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