[gtk/wip/carlosg/for-master: 1/2] gtk/texthandle: Point handle to the middle of the pointing_to rect
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/carlosg/for-master: 1/2] gtk/texthandle: Point handle to the middle of the pointing_to rect
- Date: Fri, 6 Nov 2020 21:41:46 +0000 (UTC)
commit 9d56c56117b6dd83fad8a7a49a2266a3ab0ba789
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 6 14:28:46 2020 +0100
gtk/texthandle: Point handle to the middle of the pointing_to rect
At least vertically, this gives again as much space up and down before
moving the selection the the prev/next line.
gtk/gtktexthandle.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtktexthandle.c b/gtk/gtktexthandle.c
index b900d699eb..47cceafa0e 100644
--- a/gtk/gtktexthandle.c
+++ b/gtk/gtktexthandle.c
@@ -447,7 +447,7 @@ handle_drag_update (GtkGestureDrag *gesture,
gtk_gesture_drag_get_start_point (gesture, &start_x, &start_y);
x = start_x + offset_x - handle->dx;
- y = start_y + offset_y - handle->dy;
+ y = start_y + offset_y - handle->dy + (handle->pointing_to.height / 2);
g_signal_emit (widget, signals[HANDLE_DRAGGED], 0, x, y);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]