Commit c3ca06a0 authored by Bruno Coudoin's avatar Bruno Coudoin

Fixed the bar centering

svn path=/branches/gcomprixogoo/; revision=3638
parent 130a54eb
......@@ -224,10 +224,7 @@ static void menu_start (GcomprisBoard *agcomprisBoard)
gcomprisBoard->maxlevel=1;
/* Set back the bar to it's original location */
gc_bar_location (-1, -1, -1);
gc_bar_set(GC_BAR_CONFIG|GC_BAR_ABOUT);
gc_bar_set_level(gcomprisBoard);
menuitems = g_new(MenuItems, 1);
......
......@@ -267,9 +267,9 @@ void gc_bar_start (GooCanvas *theCanvas)
update_exit_button();
/* FIXME: Bootstrap for centering should not be needed */
gc_bar_set(GC_BAR_CONFIG|GC_BAR_ABOUT);
// gc_bar_set(GC_BAR_CONFIG|GC_BAR_ABOUT);
/* Set back the bar to it's original location */
gc_bar_location (-1, -1, -1);
//gc_bar_location (-1, -1, -1);
gc_bar_set(0);
_hidden = FALSE;
......@@ -358,6 +358,9 @@ gc_bar_location (int x, int y, double zoom)
void
gc_bar_set (const GComprisBarFlags flags)
{
// Always reset the zoom factor or the calculation
// will be wrong
gc_bar_location (-1, -1, -1);
_hidden = FALSE;
goo_canvas_item_raise(rootitem, NULL);
......@@ -423,6 +426,8 @@ gc_bar_set (const GComprisBarFlags flags)
x / (bounds.x2 - bounds.x1),
1);
// Always center the bar with its new bounds
gc_bar_location (-1, -1, -1);
}
/* Hide all icons in the control bar
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment