[snappy] ui: set z rotation from gravity



commit cf7d478725cacbfdc712f094f28b0b41590b1a7a
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Tue May 1 18:58:09 2012 +0100

    ui: set z rotation from gravity
    
    make use of texture constraints on the stage.

 src/user_interface.c |   15 ++-------------
 1 files changed, 2 insertions(+), 13 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index ca52e3f..d8b3319 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -757,25 +757,14 @@ rotate_video (UserInterface * ui)
   angle += 90;
   if (angle == 360)
     angle = 0;
-  clutter_actor_set_rotation (ui->texture, CLUTTER_Z_AXIS, angle, 0, 0, 0);
+  clutter_actor_set_z_rotation_from_gravity (ui->texture, angle,
+      CLUTTER_GRAVITY_CENTER);
 
   if (angle == 90 || angle == 270) {
     ui->rotated = TRUE;
-
-    if (!ui->fullscreen) {
-      clutter_actor_set_width (ui->stage, ui->media_height);
-      clutter_actor_set_height (ui->stage, ui->media_width);
-    }
   } else {
     ui->rotated = FALSE;
-
-    if (!ui->fullscreen) {
-      clutter_actor_set_width (ui->stage, ui->media_width);
-      clutter_actor_set_height (ui->stage, ui->media_height);
-    }
   }
-
-  size_change (CLUTTER_STAGE (ui->stage), NULL, 0, ui);
 }
 
 static void



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