[snappy] ui: no swapping width/height when rotated
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: no swapping width/height when rotated
- Date: Tue, 1 May 2012 18:14:21 +0000 (UTC)
commit c18b62644555127f83baacf95e0159007e88a9c6
Author: Luis de Bethencourt <luis debethencourt com>
Date: Tue May 1 19:14:43 2012 +0100
ui: no swapping width/height when rotated
src/user_interface.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index 5b00628..d78db1f 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -760,6 +760,8 @@ rotate_video (UserInterface * ui)
} else {
ui->rotated = FALSE;
}
+
+ size_change (CLUTTER_STAGE (ui->stage), NULL, 0, ui);
}
static void
@@ -787,12 +789,7 @@ size_change (ClutterStage * stage,
new_height = stage_height;
if (media_height > 0.0f && media_width > 0.0f) {
- /* if we're rotated, the media_width and media_height are swapped */
- if (ui->rotated) {
- media_ar = media_height / media_width;
- } else {
- media_ar = media_width / media_height;
- }
+ media_ar = media_width / media_height;
/* calculate new width and height
* note: when we're done, new_width/new_height should equal media_ar */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]