texture-cache: use scale factor to load sliced image
We need to use a GdkPixbufLoader instead of the straightforward gdk_pixbuf_new_from_file(), since we want to load the image already scaled if possible - e.g. if it's an SVG file. https://bugzilla.gnome.org/show_bug.cgi?id=726907
This commit is contained in:
@ -21,7 +21,9 @@ const Animation = new Lang.Class({
|
||||
this._isPlaying = false;
|
||||
this._timeoutId = 0;
|
||||
this._frame = 0;
|
||||
this._animations = St.TextureCache.get_default().load_sliced_image (filename, width, height,
|
||||
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
this._animations = St.TextureCache.get_default().load_sliced_image (filename, width, height, scaleFactor,
|
||||
Lang.bind(this, this._animationsLoaded));
|
||||
this.actor.set_child(this._animations);
|
||||
},
|
||||
|
Reference in New Issue
Block a user