[gtksourceview] map: be more careful with edge boundary
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] map: be more careful with edge boundary
- Date: Sat, 19 Jun 2021 03:28:51 +0000 (UTC)
commit eefeb5943531d2043efc2d19cf240541298e720d
Author: Christian Hergert <chergert redhat com>
Date: Fri Jun 18 20:53:36 2021 -0700
map: be more careful with edge boundary
gtksourceview/gtksourcemap.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/gtksourceview/gtksourcemap.c b/gtksourceview/gtksourcemap.c
index 9d71b1a5..af18fbdf 100644
--- a/gtksourceview/gtksourcemap.c
+++ b/gtksourceview/gtksourcemap.c
@@ -300,7 +300,11 @@ update_scrubber_position (GtkSourceMap *map)
(gdouble)view_height *
(gdouble)child_height) +
iter_area.height;
- scrubber_area.height = CLAMP (scrubber_area.height, 1, alloc.height);
+
+ if (scrubber_area.height > alloc.height)
+ scrubber_area.height = alloc.height;
+ else if (scrubber_area.height < 0)
+ scrubber_area.height = 1;
if (memcmp (&scrubber_area, &priv->scrubber_area, sizeof scrubber_area) != 0)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]