From 6926598ae590aa562dbe47eac897cfb47d150714 Mon Sep 17 00:00:00 2001 From: Robin Date: Thu, 7 Jun 2018 23:16:32 +0200 Subject: [PATCH] A bit of a hack, but this increases the size of the adorners depending on the dpi settings. --- .../Drawing/Adorners/AbstractAdorner.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Greenshot.Addon.LegacyEditor/Drawing/Adorners/AbstractAdorner.cs b/src/Greenshot.Addon.LegacyEditor/Drawing/Adorners/AbstractAdorner.cs index 1a55c4a1c..0845bb864 100644 --- a/src/Greenshot.Addon.LegacyEditor/Drawing/Adorners/AbstractAdorner.cs +++ b/src/Greenshot.Addon.LegacyEditor/Drawing/Adorners/AbstractAdorner.cs @@ -28,6 +28,8 @@ using System.Drawing.Drawing2D; using System.Windows.Forms; using Dapplo.Windows.Common.Extensions; using Dapplo.Windows.Common.Structs; +using Dapplo.Windows.Desktop; +using Dapplo.Windows.Dpi; using Greenshot.Addons.Interfaces.Drawing; using Greenshot.Addons.Interfaces.Drawing.Adorners; @@ -37,11 +39,12 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Adorners { public class AbstractAdorner : IAdorner { - protected Size _size = new Size(4, 4); + protected Size _size = new Size(5, 5); public AbstractAdorner(IDrawableContainer owner) { - Owner = owner; + _size.Width = _size.Height = DpiHandler.ScaleWithDpi(5, DpiHandler.GetDpi(InteropWindowQuery.GetDesktopWindow().Handle)); + Owner = owner; } /// @@ -66,12 +69,9 @@ namespace Greenshot.Addon.LegacyEditor.Drawing.Adorners /// /// Returns the cursor for when the mouse is over the adorner /// - public virtual Cursor Cursor - { - get { return Cursors.SizeAll; } - } + public virtual Cursor Cursor => Cursors.SizeAll; - public virtual IDrawableContainer Owner { get; set; } + public virtual IDrawableContainer Owner { get; set; } /// /// Test if the point is inside the adorner