diff options
author | Luis de Bethencourt <luis@debethencourt.com> | 2011-03-20 22:18:37 +0100 |
---|---|---|
committer | Luis de Bethencourt <luis@debethencourt.com> | 2011-03-20 22:18:37 +0100 |
commit | fea2a121afe41c74d56bf338fc150fd1be902799 (patch) | |
tree | f3311c6c098771a26a92d403533a35b0abf218bf | |
parent | 33b0eabc8f25e38b87f96e6b051867a144f9ae35 (diff) |
ui: controls position adjusted for not-tall videos0.1_rc
-rw-r--r-- | src/user_interface.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/user_interface.c b/src/user_interface.c index 12f7bb9..42fd09d 100644 --- a/src/user_interface.c +++ b/src/user_interface.c @@ -50,10 +50,18 @@ static void update_controls_size (UserInterface * ui); static void center_controls (UserInterface * ui) { - gfloat x, y; + gfloat x, y, third_vh, diff; + third_vh = ui->stage_height / 3; x = (ui->stage_width - clutter_actor_get_width (ui->control_box)) / 2; - y = ui->stage_height - (ui->stage_height / 3); + y = ui->stage_height - third_vh; + + third_vh -= CTL_SPACING; + if (clutter_actor_get_height (ui->control_box) > third_vh) + { + diff = clutter_actor_get_height (ui->control_box) - third_vh; + y -= diff; + } clutter_actor_set_position (ui->control_box, x, y); } |