Commit graph

4 commits

Author SHA1 Message Date
Ian Moody
971debae6e Bug 1534475 - Use a responsive monitor frame in "Set As Desktop Background" preview. r=Gijs
Currently for any screen with a ratio 1.6 or above, the preview uses a 16:10
image.  However, the majority of Fx users have a screen that is 16:9[0], so for
most users the preview shows images distorted (compressed horizontally).

Originally I just added a new 16:9 version of the monitor image, but then I
realised I could save on filesize _and_ make it responsive to whatever the
user's screen actually is, rather than using arbitrary presets, by using
border-image.

The new image files are just sliced up versions of the original monitor.png
files, zopfli compressed to match (though with the power indicator dropped from
the Linux/Windows version to avoid distorting it).  The combined filesize
savings seem to be 8.5KiB on macOS and 6.5KiB on Linux/Windows.

With the removal of the use of margins on the canvas we no longer need the
platform-specific setDesktopBackground.css file.

[0] https://data.firefox.com/dashboard/hardware
As of 3rd March 2019 the top three resolutions, 1366x768, 1080p, & 1600x900,
are all 16:9 and make up 67% of the userbase.

Differential Revision: https://phabricator.services.mozilla.com/D23114

--HG--
rename : browser/themes/linux/setDesktopBackground.css => browser/themes/shared/setDesktopBackground.css
extra : moz-landing-system : lando
2019-03-19 07:12:26 +00:00
Gurzau Raul
fa3f04ecef Backed out changeset e5f1bcb6046e (bug 1534475) for failing at browser_setDesktopBackgroundPreview.js on a CLOSED TREE.
--HG--
rename : browser/themes/shared/setDesktopBackground.css => browser/themes/linux/setDesktopBackground.css
2019-03-14 02:00:20 +02:00
Ian Moody
2513e5be2c Bug 1534475 - Use a responsive monitor frame in "Set As Desktop Background" preview. r=Gijs
Currently for any screen with a ratio 1.6 or above, the preview uses a 16:10
image.  However, the majority of Fx users have a screen that is 16:9[0], so for
most users the preview shows images distorted (compressed horizontally).

Originally I just added a new 16:9 version of the monitor image, but then I
realised I could save on filesize _and_ make it responsive to whatever the
user's screen actually is, rather than using arbitrary presets, by using
border-image.

The new image files are just sliced up versions of the original monitor.png
files, zopfli compressed to match (though with the power indicator dropped from
the Linux/Windows version to avoid distorting it).  The combined filesize
savings seem to be 8.5KiB on macOS and 6.5KiB on Linux/Windows.

With the removal of the use of margins on the canvas we no longer need the
platform-specific setDesktopBackground.css file.

[0] https://data.firefox.com/dashboard/hardware
As of 3rd March 2019 the top three resolutions, 1366x768, 1080p, & 1600x900,
are all 16:9 and make up 67% of the userbase.

Differential Revision: https://phabricator.services.mozilla.com/D23114

--HG--
rename : browser/themes/linux/setDesktopBackground.css => browser/themes/shared/setDesktopBackground.css
extra : moz-landing-system : lando
2019-03-13 16:24:40 +00:00
Ian Moody
6c7d0165c4 Bug 1529363 - Fix SetDesktopBackground preview. r=paolo
Bug 1498274 removed the enclosing groupbox, which also removed the XBL box that
bounded the image size.  Add a vbox to do so.
Also add a test that checks the image's sizes match its natural sizes.

Differential Revision: https://phabricator.services.mozilla.com/D20547

--HG--
extra : moz-landing-system : lando
2019-03-06 22:13:27 +00:00