mirror of
https://github.com/edu4rdshl/gnome-shell.git
synced 2026-07-17 23:24:51 +00:00
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:
parent
9c0f069f86
commit
8b4b9d396b
1 changed files with 4 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue