From 92cbdfb7949c978e230cb2d9fcc7b2a6bc7da535 Mon Sep 17 00:00:00 2001 From: Nathan Brown Date: Mon, 31 Oct 2022 21:58:28 -0700 Subject: [PATCH] Fix off-by-one bug (cherry picked from commit 5784d6090c0a8f91643c164b78f35ccfd7484a55) --- src/Greenshot.Editor/Drawing/DrawableContainerList.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Greenshot.Editor/Drawing/DrawableContainerList.cs b/src/Greenshot.Editor/Drawing/DrawableContainerList.cs index d62643195..f6c419b50 100644 --- a/src/Greenshot.Editor/Drawing/DrawableContainerList.cs +++ b/src/Greenshot.Editor/Drawing/DrawableContainerList.cs @@ -1009,16 +1009,16 @@ namespace Greenshot.Editor.Drawing switch (direction) { case Direction.LEFT: - expansion.Left = elementSize.Width; + expansion.Left = elementSize.Width - 1; break; case Direction.RIGHT: - expansion.Right = elementSize.Width; + expansion.Right = elementSize.Width - 1; break; case Direction.TOP: - expansion.Top = elementSize.Height; + expansion.Top = elementSize.Height - 1; break; case Direction.BOTTOM: - expansion.Bottom = elementSize.Height; + expansion.Bottom = elementSize.Height - 1; break; default: break;