mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-11-05 16:04:31 +00:00
icon-container: avoid using EelDPoint
It's going away.
This commit is contained in:
parent
0832acdb43
commit
8e43d84135
3 changed files with 18 additions and 17 deletions
|
@ -583,23 +583,23 @@ recompute_bounding_box (NautilusIconCanvasItem *icon_item,
|
|||
*/
|
||||
|
||||
EelCanvasItem *item;
|
||||
EelDPoint top_left, bottom_right;
|
||||
EelDRect bounds_rect;
|
||||
|
||||
item = EEL_CANVAS_ITEM (icon_item);
|
||||
|
||||
eel_canvas_item_get_bounds (item,
|
||||
&top_left.x, &top_left.y,
|
||||
&bottom_right.x, &bottom_right.y);
|
||||
&bounds_rect.x0, &bounds_rect.y0,
|
||||
&bounds_rect.x1, &bounds_rect.y1);
|
||||
|
||||
top_left.x += i2w_dx;
|
||||
top_left.y += i2w_dy;
|
||||
bottom_right.x += i2w_dx;
|
||||
bottom_right.y += i2w_dy;
|
||||
bounds_rect.x0 += i2w_dx;
|
||||
bounds_rect.y0 += i2w_dy;
|
||||
bounds_rect.x1 += i2w_dx;
|
||||
bounds_rect.y1 += i2w_dy;
|
||||
eel_canvas_w2c_d (item->canvas,
|
||||
top_left.x, top_left.y,
|
||||
bounds_rect.x0, bounds_rect.y0,
|
||||
&item->x1, &item->y1);
|
||||
eel_canvas_w2c_d (item->canvas,
|
||||
bottom_right.x, bottom_right.y,
|
||||
bounds_rect.x1, bounds_rect.y1,
|
||||
&item->x2, &item->y2);
|
||||
}
|
||||
|
||||
|
@ -1990,7 +1990,8 @@ hit_test_stretch_handle (NautilusIconCanvasItem *item,
|
|||
|
||||
gboolean
|
||||
nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item,
|
||||
EelDPoint world_point,
|
||||
gdouble world_x,
|
||||
gdouble world_y,
|
||||
GtkCornerType *corner)
|
||||
{
|
||||
EelIRect canvas_rect;
|
||||
|
@ -1998,8 +1999,8 @@ nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item
|
|||
g_return_val_if_fail (NAUTILUS_IS_ICON_CANVAS_ITEM (item), FALSE);
|
||||
|
||||
eel_canvas_w2c (EEL_CANVAS_ITEM (item)->canvas,
|
||||
world_point.x,
|
||||
world_point.y,
|
||||
world_x,
|
||||
world_y,
|
||||
&canvas_rect.x0,
|
||||
&canvas_rect.y0);
|
||||
canvas_rect.x1 = canvas_rect.x0 + 1;
|
||||
|
|
|
@ -90,7 +90,8 @@ void nautilus_icon_canvas_item_set_renaming (NautilusIconCanv
|
|||
gboolean nautilus_icon_canvas_item_hit_test_rectangle (NautilusIconCanvasItem *item,
|
||||
EelIRect canvas_rect);
|
||||
gboolean nautilus_icon_canvas_item_hit_test_stretch_handles (NautilusIconCanvasItem *item,
|
||||
EelDPoint world_point,
|
||||
gdouble world_x,
|
||||
gdouble world_y,
|
||||
GtkCornerType *corner);
|
||||
void nautilus_icon_canvas_item_invalidate_label (NautilusIconCanvasItem *item);
|
||||
void nautilus_icon_canvas_item_invalidate_label_size (NautilusIconCanvasItem *item);
|
||||
|
|
|
@ -4428,7 +4428,6 @@ start_stretching (NautilusIconContainer *container)
|
|||
{
|
||||
NautilusIconContainerDetails *details;
|
||||
NautilusIcon *icon;
|
||||
EelDPoint world_point;
|
||||
GtkWidget *toplevel;
|
||||
GtkCornerType corner;
|
||||
GdkCursor *cursor;
|
||||
|
@ -4437,9 +4436,9 @@ start_stretching (NautilusIconContainer *container)
|
|||
icon = details->stretch_icon;
|
||||
|
||||
/* Check if we hit the stretch handles. */
|
||||
world_point.x = details->drag_x;
|
||||
world_point.y = details->drag_y;
|
||||
if (!nautilus_icon_canvas_item_hit_test_stretch_handles (icon->item, world_point, &corner)) {
|
||||
if (!nautilus_icon_canvas_item_hit_test_stretch_handles (icon->item,
|
||||
details->drag_x, details->drag_y,
|
||||
&corner)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue