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:
@ -158,7 +158,7 @@ PlacesManager.prototype = {
|
||||
|
||||
this._connect = new PlaceInfo('special:connect', _("Connect to..."),
|
||||
function (size) {
|
||||
return St.TextureCache.get_default().load_icon_name('applications-internet', size);
|
||||
return St.TextureCache.get_default().load_icon_name('applications-internet', St.IconType.FULLCOLOR, size);
|
||||
},
|
||||
function () {
|
||||
new Shell.Process({ args: ['nautilus-connect-server'] }).run();
|
||||
@ -432,7 +432,7 @@ DashPlaceDisplayItem.prototype = {
|
||||
box.add(text, { expand: true, x_fill: true });
|
||||
|
||||
if (info.isRemovable()) {
|
||||
let removeIcon = St.TextureCache.get_default().load_icon_name ('media-eject', PLACES_ICON_SIZE);
|
||||
let removeIcon = St.TextureCache.get_default().load_icon_name ('media-eject', St.IconType.FULLCOLOR, PLACES_ICON_SIZE);
|
||||
let removeIconBox = new St.Clickable({ child: removeIcon,
|
||||
reactive: true });
|
||||
box.add(removeIconBox);
|
||||
|
Reference in New Issue
Block a user