diff options
author | Bastien Nocera <hadess@hadess.net> | 2011-01-27 17:52:33 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2011-01-27 17:52:33 +0000 |
commit | ac2c89083183d5e540450db5d7c1d953449984c7 (patch) | |
tree | 1fde90d26166c41669c56ede637f75de1a849e19 | |
parent | 8bc05fac46fec63ce647187a6059173da2326de2 (diff) | |
download | totem-ac2c89083183d5e540450db5d7c1d953449984c7.tar.gz |
backend: Use a 16:9 ratio by default
When trying to resize for the logo mode. Nobody wants a square
movie player, it's too 1990's.
-rw-r--r-- | src/backend/bacon-video-widget-gst-0.10.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c index 607da8212..1a9d7914b 100644 --- a/src/backend/bacon-video-widget-gst-0.10.c +++ b/src/backend/bacon-video-widget-gst-0.10.c @@ -441,6 +441,11 @@ get_media_size (BaconVideoWidget *bvw, gint *width, gint *height) if (pixbuf) { *width = gdk_pixbuf_get_width (pixbuf); *height = gdk_pixbuf_get_height (pixbuf); + if (*width == *height) { + /* The icons will be square, so lie so we get a 16:9 + * ratio */ + *width = (int) ((float) *height / 9. * 16.); + } } else { *width = 0; *height = 0; |