summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2011-01-27 17:52:33 +0000
committerBastien Nocera <hadess@hadess.net>2011-01-27 17:52:33 +0000
commitac2c89083183d5e540450db5d7c1d953449984c7 (patch)
tree1fde90d26166c41669c56ede637f75de1a849e19
parent8bc05fac46fec63ce647187a6059173da2326de2 (diff)
downloadtotem-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.c5
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;