[cheese] Use a layout manager instead of constraints
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Use a layout manager instead of constraints
- Date: Mon, 28 Oct 2013 20:51:22 +0000 (UTC)
commit 341fcb6d2f1e0726eda5a7f84e033af47703d3e9
Author: Bastien Nocera <hadess hadess net>
Date: Thu Oct 24 16:18:47 2013 +0200
Use a layout manager instead of constraints
This reduces property changes for every little change in the stage's
properties.
https://bugzilla.gnome.org/show_bug.cgi?id=710821
libcheese/cheese-widget.c | 4 +---
1 files changed, 1 insertions(+), 3 deletions(-)
---
diff --git a/libcheese/cheese-widget.c b/libcheese/cheese-widget.c
index e45e293..ba35e27 100644
--- a/libcheese/cheese-widget.c
+++ b/libcheese/cheese-widget.c
@@ -196,7 +196,6 @@ cheese_widget_init (CheeseWidget *widget)
CheeseWidgetPrivate *priv = widget->priv = CHEESE_WIDGET_GET_PRIVATE (widget);
GtkWidget *box;
ClutterActor *stage, *frame;
- ClutterConstraint *constraint;
ClutterColor black = { 0x00, 0x00, 0x00, 0xff };
priv->state = CHEESE_WIDGET_STATE_NONE;
@@ -227,9 +226,8 @@ cheese_widget_init (CheeseWidget *widget)
clutter_actor_set_size (priv->texture, 400, 300);
totem_aspect_frame_set_child (TOTEM_ASPECT_FRAME (frame), priv->texture);
+ clutter_actor_set_layout_manager (stage, clutter_bin_layout_new (CLUTTER_BIN_ALIGNMENT_FILL,
CLUTTER_BIN_ALIGNMENT_FILL));
clutter_actor_add_child (stage, frame);
- constraint = clutter_bind_constraint_new (stage, CLUTTER_BIND_SIZE, 0.0);
- clutter_actor_add_constraint_with_name (frame, "size", constraint);
gtk_widget_show (priv->screen);
clutter_actor_show (priv->texture);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]