[snappy] ui: update stage size when loading new uri
- From: Luis de Bethencourt <luisbg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [snappy] ui: update stage size when loading new uri
- Date: Fri, 4 May 2012 10:10:34 +0000 (UTC)
commit 4642273372b7db8f17f6202b4d5dcdb83b479e91
Author: Luis de Bethencourt <luis debethencourt com>
Date: Fri May 4 10:58:40 2012 +0100
ui: update stage size when loading new uri
src/user_interface.c | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/user_interface.c b/src/user_interface.c
index d38904e..4188ac0 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -1033,6 +1033,10 @@ interface_load_uri (UserInterface * ui, gchar * uri)
ui->media_height);
size_change (CLUTTER_STAGE (ui->stage), NULL, 0, ui);
+ if (!ui->fullscreen)
+ clutter_actor_set_size (CLUTTER_ACTOR (ui->stage), ui->media_width,
+ ui->media_height);
+
return TRUE;
}
@@ -1065,8 +1069,8 @@ interface_start (UserInterface * ui, gchar * uri)
ui->media_width = ui->engine->media_width;
ui->media_height = ui->engine->media_height;
- ui->stage_width = ui->engine->media_width;
- ui->stage_height = ui->engine->media_height;
+ ui->stage_width = ui->media_width;
+ ui->stage_height = ui->media_height;
ui->stage = clutter_stage_get_default ();
ui->controls_showing = FALSE;
@@ -1082,8 +1086,8 @@ interface_start (UserInterface * ui, gchar * uri)
ui->duration_str = position_ns_to_str (ui->engine->media_duration);
clutter_stage_set_color (CLUTTER_STAGE (ui->stage), &stage_color);
- clutter_stage_set_minimum_size (CLUTTER_STAGE (ui->stage),
- ui->stage_width, ui->stage_height);
+ clutter_actor_set_size (CLUTTER_ACTOR (ui->stage), ui->media_width,
+ ui->media_height);
clutter_stage_set_title (CLUTTER_STAGE (ui->stage), ui->filename);
clutter_actor_set_size (CLUTTER_ACTOR (ui->stage), ui->stage_width,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]