[gnome-shell/wip/carlosg/magnifier-improvements: 1/11] magnifier: Apply scale factor to crosshair length
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/magnifier-improvements: 1/11] magnifier: Apply scale factor to crosshair length
- Date: Thu, 6 Feb 2020 13:51:01 +0000 (UTC)
commit f00cb24f2bd4c748bfe77aaf87f4e55ddab0cfad
Author: Carlos Garnacho <carlosg gnome org>
Date: Thu Feb 6 10:31:17 2020 +0100
magnifier: Apply scale factor to crosshair length
On hidpi displays the length is double as advertised, make it match
the advertised length.
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 d7d3506a57..af6c2567d6 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);
+ }
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]