GLib::ThemedIcon
class GLib::ThemedIcon
GLib::ThemedIcon is an implementation of GLib::Icon that supports icon themes. GLib::ThemedIcon contains a list of all of the icons present in an icon theme, so that icons can be looked up quickly. GLib::ThemedIcon does not provide actual pixmaps for icons, just the icon names. Ideally something like Gtk::IconTheme#choose_icon should be used to resolve the list of names so that fallback icons work nicely with themes that inherit other themes.
Class Methods
GLib::ThemedIcon.new(iconname)
-
Creates a new themed icon for iconname.
- Returns: a new GLib::ThemedIcon
Instance Methods
==(other)
- See GLib::Icon#==.
append_name(iconname)
-
Append a name to the list of icons from within this icon.
- iconname: Name of icon to append to list of icons from within this icon
eql?
- See GLib::Icon#eql?.
hash
- See GLib::Icon#hash.
names
-
Gets An Array containing the icon names.
- Returns: An Array containing the icon names
prepend_name(iconname)
-
Prepend a name to the list of icons from within this icon.
Since 2.18
- iconname: Name of icon to prepend to list of icons from within this icon
to_s
- See GLib::Icon#to_s.
to_str
- See GLib::Icon#to_str.
to_string
- See GLib::Icon#to_string.
use_default_fallbacks?
-
Checks whether or not to use default fallbacks found by shortening the name
at '-' characters. Ignores names after the first if multiple names are
given. or not.
- Returns: true if the default fallbacks found by shortening the name at '-' characters should be used
Properties
name: String (Write)
- The name of the icon
names: Array (Read/Write)
- An Array containing the icon names
use-default-fallbacks: true or false (Read/Write)
- Whether or not to use default fallbacks found by shortening the name at '-' characters. Ignores names after the first if multiple names are given
Keyword(s):
References:[GLib::ThemedIcon] [index-ruby-gio2] [GLib::Icon] [Ruby/GIO] [index-ruby-glib2]