Florian Müllner 5520bb3890 texture-cache: Keep aspect ratio for content images
Images are loaded either with a supplied fixed size, or using the "native"
dimensions of the file. When creating a content image from the loaded data,
we currently simply apply this directly to the preferred size.

This works usually fine: GdkPixbuf will always keep the aspect ratio, so
if only one dimension is provided, the other will be adjusted accordingly:

Loading a 200x200 image with a requested size of (100, -1) will result in
a 100x100 content image.

There is a catch though: GdkPixbuf will only scale *down* to the requested
size, no up. That is, loading a 100x100 image with a requested size of
(200, -1) will result in a 100x100 pixbuf. But as we assume that the pixbuf
size matches the requested size, the image content ends up with 200x100.

Fix this by explicitly handling the case where only one size was supplied,
and make the other dimension take the aspect ratio into account

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/525
2019-05-04 00:50:31 +00:00
2019-04-26 21:32:51 +02:00
2019-04-17 21:25:34 +00:00
2018-01-07 21:39:18 +01:00
2019-05-01 19:54:12 +00:00
2019-03-04 20:55:15 +00:00
2019-01-09 23:09:18 +00:00
2019-03-04 20:55:15 +00:00
2014-01-08 04:35:14 +07:00
2018-12-31 13:25:05 -06:00
2019-04-17 21:08:32 +02:00
2019-02-13 20:37:39 +01:00
2019-03-04 20:55:15 +00:00

GNOME Shell

GNOME Shell provides core user interface functions for the GNOME 3 desktop, like switching to windows and launching applications. GNOME Shell takes advantage of the capabilities of modern graphics hardware and introduces innovative user interface concepts to provide a visually attractive and easy to use experience.

For more information about GNOME Shell, including instructions on how to build GNOME Shell from source and how to get involved with the project, see the project wiki.

Bugs should be reported to the GNOME bug tracking system.

Contributing

To contribute, open merge requests at https://gitlab.gnome.org/GNOME/gnome-shell.

Commit messages should follow the GNOME commit message guidelines. We require an URL to either an issue or a merge request in each commit.

License

GNOME Shell is distributed under the terms of the GNU General Public License, version 2 or later. See the COPYING file for details.

Description
Languages
C 49.2%
JavaScript 47.4%
SCSS 1.4%
Meson 0.8%
Python 0.6%
Other 0.4%