From 8b4b9d396b60f023065d8ff0f548292c49f32f02 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Thu, 6 Feb 2020 10:31:17 +0100 Subject: [PATCH] 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 --- js/ui/magnifier.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index d7d3506a5..af6c2567d 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -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); + } } /**