magnifier: Apply scale factor to crosshair length

On hidpi displays the length is double as advertised, make it match
the advertised length.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/984
This commit is contained in:
Carlos Garnacho 2020-02-06 10:31:17 +01:00 committed by Florian Müllner
parent 9c0f069f86
commit 8b4b9d396b

View File

@ -430,8 +430,10 @@ var Magnifier = class Magnifier {
* lines making up the crosshairs.
*/
setCrosshairsLength(length) {
if (this._crossHairs)
this._crossHairs.setLength(length);
if (this._crossHairs) {
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
this._crossHairs.setLength(length / scaleFactor);
}
}
/**