Add symbolic icons to TextureCache's load_icon_name()
Icons can be loaded as St.Icon.SYMBOLIC, FULLCOLOR, APPLICATION or DOCUMENT. The first will look for a symbolic equivalent, the second looks for a full-color version (and does fallback, eg, from "drive-harddisk-usb" to "drive-harddisk"). APPLICATION and DOCUMENT do full-color icons without fallback (as specified by the icon spec). And update various callers to use the right flags. Based on a patch from Matt Novenstern. https://bugzilla.gnome.org/show_bug.cgi?id=621311
This commit is contained in:
@ -678,8 +678,9 @@ LookingGlass.prototype = {
|
||||
|
||||
let toolbar = new St.BoxLayout({ name: 'Toolbar' });
|
||||
this.actor.add_actor(toolbar);
|
||||
let inspectIcon = St.TextureCache.get_default().load_gicon(new Gio.ThemedIcon({ name: 'gtk-color-picker' }),
|
||||
24);
|
||||
let inspectIcon = St.TextureCache.get_default().load_icon_name('gtk-color-picker',
|
||||
St.IconType.SYMBOLIC,
|
||||
24);
|
||||
toolbar.add_actor(inspectIcon);
|
||||
inspectIcon.reactive = true;
|
||||
inspectIcon.connect('button-press-event', Lang.bind(this, function () {
|
||||
|
Reference in New Issue
Block a user