From 1cb21de201cd1743db313541259e7ad3288d1f59 Mon Sep 17 00:00:00 2001 From: MineBill Date: Fri, 14 Feb 2025 00:34:04 +0200 Subject: [PATCH] Round thickness of line highlight to prevent weird rendering. --- BeefLibs/Beefy2D/src/theme/dark/DarkEditWidget.bf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BeefLibs/Beefy2D/src/theme/dark/DarkEditWidget.bf b/BeefLibs/Beefy2D/src/theme/dark/DarkEditWidget.bf index 7025c768..d80365aa 100644 --- a/BeefLibs/Beefy2D/src/theme/dark/DarkEditWidget.bf +++ b/BeefLibs/Beefy2D/src/theme/dark/DarkEditWidget.bf @@ -575,7 +575,7 @@ namespace Beefy.theme.dark { if (mHiliteCurrentLine && selStartIdx == selEndIdx) { - float thickness = 2 * (fontLineSpacing / 18); + float thickness = Math.Ceiling(2 * (Math.Floor(fontLineSpacing) / 18)); // This isn't quite the right value, but I'm not sure how to get this // to properly highlight the whole line without getting cut off - this works well for now. float totalLineWidth = mEditWidget.mScrollContentContainer.mWidth - thickness;