Replace ClutterVertex by graphene_point3d_t
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/421
This commit is contained in:
parent
59e3a1a816
commit
0199857c5b
@ -1,7 +1,7 @@
|
|||||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||||
/* exported BaseIcon, IconGrid, PaginatedIconGrid */
|
/* exported BaseIcon, IconGrid, PaginatedIconGrid */
|
||||||
|
|
||||||
const { Clutter, GLib, GObject, Meta, St } = imports.gi;
|
const { Clutter, GLib, GObject, Graphene, Meta, St } = imports.gi;
|
||||||
|
|
||||||
const Params = imports.misc.params;
|
const Params = imports.misc.params;
|
||||||
const Main = imports.ui.main;
|
const Main = imports.ui.main;
|
||||||
@ -402,7 +402,7 @@ var IconGrid = GObject.registerClass({
|
|||||||
let allocationBox = this.get_allocation_box();
|
let allocationBox = this.get_allocation_box();
|
||||||
let paintBox = themeNode.get_paint_box(allocationBox);
|
let paintBox = themeNode.get_paint_box(allocationBox);
|
||||||
|
|
||||||
let origin = new Clutter.Vertex();
|
let origin = new Graphene.Point3D();
|
||||||
origin.x = paintBox.x1 - allocationBox.x1;
|
origin.x = paintBox.x1 - allocationBox.x1;
|
||||||
origin.y = paintBox.y1 - allocationBox.y1;
|
origin.y = paintBox.y1 - allocationBox.y1;
|
||||||
origin.z = 0.0;
|
origin.z = 0.0;
|
||||||
|
@ -97,7 +97,7 @@ shell_util_get_transformed_allocation (ClutterActor *actor,
|
|||||||
/* Code adapted from clutter-actor.c:
|
/* Code adapted from clutter-actor.c:
|
||||||
* Copyright 2006, 2007, 2008 OpenedHand Ltd
|
* Copyright 2006, 2007, 2008 OpenedHand Ltd
|
||||||
*/
|
*/
|
||||||
ClutterVertex v[4];
|
graphene_point3d_t v[4];
|
||||||
gfloat x_min, x_max, y_min, y_max;
|
gfloat x_min, x_max, y_min, y_max;
|
||||||
guint i;
|
guint i;
|
||||||
|
|
||||||
|
@ -506,7 +506,7 @@ st_box_layout_get_paint_volume (ClutterActor *actor,
|
|||||||
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (actor));
|
||||||
ClutterActorBox allocation_box;
|
ClutterActorBox allocation_box;
|
||||||
ClutterActorBox content_box;
|
ClutterActorBox content_box;
|
||||||
ClutterVertex origin;
|
graphene_point3d_t origin;
|
||||||
|
|
||||||
/* Setting the paint volume does not make sense when we don't have any allocation */
|
/* Setting the paint volume does not make sense when we don't have any allocation */
|
||||||
if (!clutter_actor_has_allocation (actor))
|
if (!clutter_actor_has_allocation (actor))
|
||||||
|
@ -100,7 +100,7 @@ st_scroll_view_fade_paint_target (ClutterOffscreenEffect *effect)
|
|||||||
|
|
||||||
float fade_area_topleft[2];
|
float fade_area_topleft[2];
|
||||||
float fade_area_bottomright[2];
|
float fade_area_bottomright[2];
|
||||||
ClutterVertex verts[4];
|
graphene_point3d_t verts[4];
|
||||||
|
|
||||||
clutter_actor_get_paint_box (self->actor, &paint_box);
|
clutter_actor_get_paint_box (self->actor, &paint_box);
|
||||||
clutter_actor_get_abs_allocation_vertices (self->actor, verts);
|
clutter_actor_get_abs_allocation_vertices (self->actor, verts);
|
||||||
|
@ -762,7 +762,7 @@ st_widget_get_paint_volume (ClutterActor *self,
|
|||||||
ClutterActorBox paint_box, alloc_box;
|
ClutterActorBox paint_box, alloc_box;
|
||||||
StThemeNode *theme_node;
|
StThemeNode *theme_node;
|
||||||
StWidgetPrivate *priv;
|
StWidgetPrivate *priv;
|
||||||
ClutterVertex origin;
|
graphene_point3d_t origin;
|
||||||
|
|
||||||
/* Setting the paint volume does not make sense when we don't have any allocation */
|
/* Setting the paint volume does not make sense when we don't have any allocation */
|
||||||
if (!clutter_actor_has_allocation (self))
|
if (!clutter_actor_has_allocation (self))
|
||||||
@ -2062,7 +2062,7 @@ filter_by_position (GList *children,
|
|||||||
StDirectionType direction)
|
StDirectionType direction)
|
||||||
{
|
{
|
||||||
ClutterActorBox cbox;
|
ClutterActorBox cbox;
|
||||||
ClutterVertex abs_vertices[4];
|
graphene_point3d_t abs_vertices[4];
|
||||||
GList *l, *ret;
|
GList *l, *ret;
|
||||||
ClutterActor *child;
|
ClutterActor *child;
|
||||||
|
|
||||||
@ -2128,7 +2128,7 @@ get_distance (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
int ax, ay, bx, by, dx, dy;
|
int ax, ay, bx, by, dx, dy;
|
||||||
ClutterActorBox abox;
|
ClutterActorBox abox;
|
||||||
ClutterVertex abs_vertices[4];
|
graphene_point3d_t abs_vertices[4];
|
||||||
|
|
||||||
clutter_actor_get_abs_allocation_vertices (actor, abs_vertices);
|
clutter_actor_get_abs_allocation_vertices (actor, abs_vertices);
|
||||||
clutter_actor_box_from_vertices (&abox, abs_vertices);
|
clutter_actor_box_from_vertices (&abox, abs_vertices);
|
||||||
@ -2232,7 +2232,7 @@ st_widget_real_navigate_focus (StWidget *widget,
|
|||||||
else /* direction is an arrow key, not tab */
|
else /* direction is an arrow key, not tab */
|
||||||
{
|
{
|
||||||
ClutterActorBox sort_box;
|
ClutterActorBox sort_box;
|
||||||
ClutterVertex abs_vertices[4];
|
graphene_point3d_t abs_vertices[4];
|
||||||
|
|
||||||
/* Compute the allocation box of the previous focused actor. If there
|
/* Compute the allocation box of the previous focused actor. If there
|
||||||
* was no previous focus, use the coordinates of the appropriate edge of
|
* was no previous focus, use the coordinates of the appropriate edge of
|
||||||
|
Loading…
Reference in New Issue
Block a user