St.Icon:gicon loads all images as squares
It seems that this construct, with the SVG file being non-square would only ever create a square St.Widget
:
const file = Gio.File.new_for_uri(
'resource:///org/gnome/shell/theme/gnome-shell-start.svg');
let icon = new Gio.FileIcon({ file });
this._icon = new St.Icon({ icon_size: 256,
gicon: icon });
That's because the call to st_texture_cache_load_gicon()
passes an icon size which st_texture_cache_load_gicon()
interprets as being both the height and width (look for actor_size
). I could not find a work-around.