st/widget: Remove get_resource_scale function
ClutterActor provides the same function, but with a different return value. So since we already switched to the ClutterActor implementation in our C code, we can now safely remove st_widget_get_resource_scale() and update the JS code that's still using the old API. https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1287
This commit is contained in:

committed by
Jonas Ådahl

parent
1524abc947
commit
d885486397
@ -60,7 +60,7 @@ class Animation extends St.Bin {
|
||||
}
|
||||
|
||||
_loadFile(file, width, height) {
|
||||
let [validResourceScale, resourceScale] = this.get_resource_scale();
|
||||
const resourceScale = this.get_resource_scale();
|
||||
let wasPlaying = this._isPlaying;
|
||||
|
||||
if (this._isPlaying)
|
||||
@ -69,12 +69,6 @@ class Animation extends St.Bin {
|
||||
this._isLoaded = false;
|
||||
this.destroy_all_children();
|
||||
|
||||
if (!validResourceScale) {
|
||||
if (wasPlaying)
|
||||
this.play();
|
||||
return;
|
||||
}
|
||||
|
||||
let textureCache = St.TextureCache.get_default();
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
this._animations = textureCache.load_sliced_image(file, width, height,
|
||||
|
Reference in New Issue
Block a user