mirror of
https://github.com/brl/mutter.git
synced 2024-11-12 17:27:03 -05:00
ClutterBindConstraint: Add CLUTTER_BIND_ALL coordinate
Add a CLUTTER_BIND_ALL that binds both size and position.
This commit is contained in:
parent
b8e5603a85
commit
851d2a42c4
@ -212,6 +212,13 @@ clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
|
||||
allocation->y2 = allocation->y1 + source_height + bind->offset;
|
||||
break;
|
||||
|
||||
case CLUTTER_BIND_ALL:
|
||||
allocation->x1 = source_position.x + bind->offset;
|
||||
allocation->y1 = source_position.y + bind->offset;
|
||||
allocation->x2 = allocation->x1 + source_width + bind->offset;
|
||||
allocation->y2 = allocation->y1 + source_height + bind->offset;
|
||||
break;
|
||||
|
||||
default:
|
||||
g_assert_not_reached ();
|
||||
break;
|
||||
|
@ -486,7 +486,8 @@ typedef enum {
|
||||
* %CLUTTER_BIND_Y
|
||||
* @CLUTTER_BIND_SIZE: Equivalent to %CLUTTER_BIND_WIDTH and
|
||||
* %CLUTTER_BIND_HEIGHT
|
||||
*
|
||||
* @CLUTTER_BIND_ALL: Equivalent to %CLUTTER_BIND_POSITION and
|
||||
* %CLUTTER_BIND_SIZE
|
||||
* Specifies which property should be used in a binding
|
||||
*
|
||||
* Since: 1.4
|
||||
@ -497,7 +498,8 @@ typedef enum { /*< prefix=CLUTTER_BIND >*/
|
||||
CLUTTER_BIND_WIDTH,
|
||||
CLUTTER_BIND_HEIGHT,
|
||||
CLUTTER_BIND_POSITION,
|
||||
CLUTTER_BIND_SIZE
|
||||
CLUTTER_BIND_SIZE,
|
||||
CLUTTER_BIND_ALL
|
||||
} ClutterBindCoordinate;
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user