magnifier: Use actor scaling filters on content texture node

Reuse the same filter values of the attached actor, instead of hardcoding the
defaults.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/454
This commit is contained in:
Marco Trevisan (Treviño) 2019-03-11 17:30:39 -04:00
parent 9158f55360
commit 727195c767

View File

@ -66,10 +66,9 @@ var MouseSpriteContent = GObject.registerClass({
return; return;
let color = Clutter.Color.get_static(Clutter.StaticColor.WHITE); let color = Clutter.Color.get_static(Clutter.StaticColor.WHITE);
let [minFilter, magFilter] = actor.get_content_scaling_filters();
let textureNode = new Clutter.TextureNode(this._texture, let textureNode = new Clutter.TextureNode(this._texture,
color, color, minFilter, magFilter);
Clutter.ScalingFilter.NEAREST,
Clutter.ScalingFilter.NEAREST);
textureNode.set_name('MouseSpriteContent'); textureNode.set_name('MouseSpriteContent');
node.add_child(textureNode); node.add_child(textureNode);