[snappy] ui: set minimum display size to half the media size



commit ac40e92de7bf58640489730b2450184c5f4193ec
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Tue Mar 12 11:00:06 2013 -0400

    ui: set minimum display size to half the media size

 src/user_interface.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index cc5b208..db0157a 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -1154,13 +1154,13 @@ interface_load_uri (UserInterface * ui, gchar * uri)
     ui->stage_width = ui->media_width;
     ui->stage_height = ui->media_height;
 
-    gtk_widget_set_size_request (ui->clutter_widget, ui->stage_width,
-      ui->stage_height);
-    clutter_actor_set_size (CLUTTER_ACTOR (ui->stage), ui->media_width,
-        ui->media_height);
+    gtk_widget_set_size_request (ui->clutter_widget, ui->stage_width / 2,
+      ui->stage_height / 2);
+    clutter_actor_set_size (CLUTTER_ACTOR (ui->stage), ui->stage_width,
+        ui->stage_height);
 
-    gtk_window_resize (GTK_WINDOW (ui->window), ui->media_width,
-        ui->media_height);
+    gtk_window_resize (GTK_WINDOW (ui->window), ui->stage_width,
+        ui->stage_height);
   }
 
   if (!ui->penalty_box_active)
@@ -1271,7 +1271,9 @@ interface_start (UserInterface * ui, gchar * uri)
   /* Set the size of the widget,
    * because we should not set the size of its stage when using GtkClutterEmbed.
    */
-  gtk_widget_set_size_request (ui->clutter_widget, ui->stage_width,
+  gtk_widget_set_size_request (ui->clutter_widget, ui->stage_width / 2,
+      ui->stage_height / 2);
+  gtk_window_resize (GTK_WINDOW (ui->window), ui->stage_width,
       ui->stage_height);
 
   ui->controls_showing = FALSE;


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