1

The newer versions of Gyroscope has higher-resolution versions of the icons (in toolbar_hd.gif) that is used when the user's computer supports it. If my testing machine has a high resolution, how can I force it to use the low-resolution icons for testing?

Tom Swift
  • 25
  • 3

1 Answers1

0

Starting 6.9 Gyroscope uses a newer version of nano.js which includes a function hdpromote that loads a separate CSS if both conditions are met:

  • the device has a pixel ratio higher than 1
  • the browser CSS correctly supports background-size

In both index.php and iphone.php, right after nano.js is included near the footer, there's a line that "upgrades" the icons to higher resolution:

<script>
  hdpromote('toolbar_hd.css');
</script>

You may comment out this line to ignore the high resolution display.

Conversely, if you don't have a HD screen but want to force load toolbar_hd.css, there are two ways:

You may modify the line in nano.js so that the pixel density is ignored:

if (typeof(document.documentElement.style.backgroundSize)=='string')

In Firefox, when the zoom level is 200%, the browser reports the pixel ratio to be 2. Some may argue that this is a browser bug, but you can take advantage of this "feature" to test the HD mode.

The user icons look different in SD and HD modes. This is intentional, so that it is obvious which mode is enabled without having to examine graphic quality:

Left: SD; Right: HD

Schien
  • 3,855
  • 1
  • 16
  • 29