[gtk+] roundedrect: Fix coordinate mixup in contains_point
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] roundedrect: Fix coordinate mixup in contains_point
- Date: Sun, 4 Feb 2018 13:57:26 +0000 (UTC)
commit 5aaf75201324fb6f7677493930c1dcc126b499c2
Author: Timm Bäder <mail baedert org>
Date: Sat Feb 3 23:14:16 2018 +0100
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.
gsk/gskroundedrect.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gsk/gskroundedrect.c b/gsk/gskroundedrect.c
index ce9757e..382d56a 100644
--- a/gsk/gskroundedrect.c
+++ b/gsk/gskroundedrect.c
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]