[totem] backend: Use a 16:9 ratio by default



commit ac2c89083183d5e540450db5d7c1d953449984c7
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Jan 27 17:52:33 2011 +0000

    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.

 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 607da82..1a9d791 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]