Le 10/02/2023 à 05:24, Scott Kostyshak a écrit :
Does cursor position need to be adapted for some reason? I attach two
screenshots. "bad.png" is a screenshot with this commit, and "good.png"
is the screenshot with the commit before. The cursor position of
"bad.png" seems to intersect the border (the real position is that it's
at the last position inside the "On Slide" inset).

Indeed, cursor needed to be adapted. Is this patch OK for you ?

JMarc


From 6bf92c5edff747369f66cddbc6ecf8f26d114951 Mon Sep 17 00:00:00 2001
From: Jean-Marc Lasgouttes <lasgout...@lyx.org>
Date: Mon, 20 Feb 2023 17:14:03 +0100
Subject: [PATCH] Fixup 04ece4f0d6a: fix cursor position

---
 src/insets/InsetCollapsible.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/insets/InsetCollapsible.cpp b/src/insets/InsetCollapsible.cpp
index d629aaaca4..f76dc99348 100644
--- a/src/insets/InsetCollapsible.cpp
+++ b/src/insets/InsetCollapsible.cpp
@@ -424,7 +424,7 @@ void InsetCollapsible::cursorPos(BufferView const & bv,
 
 	switch (geometry(bv)) {
 	case LeftButton:
-		x += dimensionCollapsed(bv).wid;
+		x += dimensionCollapsed(bv).wid - leftOffset(&bv) / 2;
 		break;
 	case TopButton: {
 		y += dimensionCollapsed(bv).des + textdim.asc;
-- 
2.25.1

-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to