mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 10:50:10 +00:00
roundedrect: Fix coordinate mixup in contains_point
This together with the optimizations in GtkSnapshot was causing circular buttons to become squared when partially scrolled out of view.
This commit is contained in:
parent
76258c8e3a
commit
5aaf752013
@ -362,7 +362,7 @@ gsk_rounded_rect_contains_point (const GskRoundedRect *self,
|
||||
return FALSE;
|
||||
|
||||
if (self->bounds.origin.x + self->corner[GSK_CORNER_BOTTOM_LEFT].width > point->x &&
|
||||
self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_LEFT].height > point->y &&
|
||||
self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_LEFT].height < point->y &&
|
||||
!ellipsis_contains_point (&self->corner[GSK_CORNER_BOTTOM_LEFT],
|
||||
&GRAPHENE_POINT_INIT (
|
||||
self->bounds.origin.x + self->corner[GSK_CORNER_BOTTOM_LEFT].width - point->x,
|
||||
@ -371,7 +371,7 @@ gsk_rounded_rect_contains_point (const GskRoundedRect *self,
|
||||
return FALSE;
|
||||
|
||||
if (self->bounds.origin.x + self->bounds.size.width - self->corner[GSK_CORNER_BOTTOM_RIGHT].width < point->x &&
|
||||
self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_RIGHT].height > point->y &&
|
||||
self->bounds.origin.y + self->bounds.size.height - self->corner[GSK_CORNER_BOTTOM_RIGHT].height < point->y &&
|
||||
!ellipsis_contains_point (&self->corner[GSK_CORNER_BOTTOM_RIGHT],
|
||||
&GRAPHENE_POINT_INIT (
|
||||
self->bounds.origin.x + self->bounds.size.width - self->corner[GSK_CORNER_BOTTOM_RIGHT].width - point->x,
|
||||
|
Loading…
Reference in New Issue
Block a user