Use St.Icon for named icons
Switch from St.TextureCache.load_named_icon() to using St.Icon for named icons. Along with the advantage of getting colorization right for symbolic icons, this allows moving some icon sizes into the CSS. In the CSS, the system status icon size is changed to be 1em (=16px for the default font size), at the request of the artists. See bug 613448. https://bugzilla.gnome.org/show_bug.cgi?id=633865
This commit is contained in:
@ -158,7 +158,9 @@ PlacesManager.prototype = {
|
||||
|
||||
this._connect = new PlaceInfo('special:connect', _("Connect to..."),
|
||||
function (size) {
|
||||
return St.TextureCache.get_default().load_icon_name('applications-internet', St.IconType.FULLCOLOR, size);
|
||||
return new St.Icon({ icon_name: 'applications-internet',
|
||||
icon_type: St.IconType.FULLCOLOR,
|
||||
icon_size: size });
|
||||
},
|
||||
function () {
|
||||
new Shell.Process({ args: ['nautilus-connect-server'] }).run();
|
||||
@ -432,7 +434,9 @@ DashPlaceDisplayItem.prototype = {
|
||||
box.add(text, { expand: true, x_fill: true });
|
||||
|
||||
if (info.isRemovable()) {
|
||||
let removeIcon = St.TextureCache.get_default().load_icon_name ('media-eject', St.IconType.FULLCOLOR, PLACES_ICON_SIZE);
|
||||
let removeIcon = new St.Icon({ icon_name: 'media-eject',
|
||||
icon_type: St.IconType.FULLCOLOR,
|
||||
icon_size: PLACES_ICON_SIZE });
|
||||
let removeIconBox = new St.Clickable({ child: removeIcon,
|
||||
reactive: true });
|
||||
box.add(removeIconBox);
|
||||
|
Reference in New Issue
Block a user