mirror of
https://github.com/brl/mutter.git
synced 2025-03-29 14:43:47 +00:00
examples: Allow optional animations in flow-layout
Allow animations to demonstrate the LayoutManager animation API https://bugzilla.gnome.org/show_bug.cgi?id=677085
This commit is contained in:
parent
4c3bb5e2de
commit
93627c876d
@ -9,6 +9,7 @@ static gboolean is_homogeneous = FALSE;
|
|||||||
static gboolean vertical = FALSE;
|
static gboolean vertical = FALSE;
|
||||||
static gboolean random_size = FALSE;
|
static gboolean random_size = FALSE;
|
||||||
static gboolean fixed_size = FALSE;
|
static gboolean fixed_size = FALSE;
|
||||||
|
static gboolean use_animations = FALSE;
|
||||||
|
|
||||||
static gint n_rects = N_RECTS;
|
static gint n_rects = N_RECTS;
|
||||||
static gint x_spacing = 0;
|
static gint x_spacing = 0;
|
||||||
@ -64,6 +65,13 @@ static GOptionEntry entries[] = {
|
|||||||
&fixed_size,
|
&fixed_size,
|
||||||
"Fix the layout size", NULL
|
"Fix the layout size", NULL
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"use-animations", 'a',
|
||||||
|
0,
|
||||||
|
G_OPTION_ARG_NONE,
|
||||||
|
&use_animations,
|
||||||
|
"Use animations", NULL
|
||||||
|
},
|
||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -102,6 +110,7 @@ main (int argc, char *argv[])
|
|||||||
x_spacing);
|
x_spacing);
|
||||||
clutter_flow_layout_set_row_spacing (CLUTTER_FLOW_LAYOUT (layout),
|
clutter_flow_layout_set_row_spacing (CLUTTER_FLOW_LAYOUT (layout),
|
||||||
y_spacing);
|
y_spacing);
|
||||||
|
clutter_layout_manager_set_use_animations (layout, use_animations);
|
||||||
|
|
||||||
box = clutter_actor_new ();
|
box = clutter_actor_new ();
|
||||||
clutter_actor_set_layout_manager (box, layout);
|
clutter_actor_set_layout_manager (box, layout);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user