diff options
author | Karl <contact@scowencomputers.co.nz> | 2020-01-18 07:11:13 +0300 |
---|---|---|
committer | Karl <contact@scowencomputers.co.nz> | 2020-01-18 07:11:13 +0300 |
commit | d826bebd54552d0f7e1948a8e591b988cce6edb1 (patch) | |
tree | 359643084ca459a4dcb6e6ad0117862b2e617749 /mcs/class | |
parent | f39d6526422c3ab4994daa067ff6fde98d774ae0 (diff) |
Calculate DPI before Recalculate.
Diffstat (limited to 'mcs/class')
-rw-r--r-- | mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs index d6eae37f5b4..cf65c990cbf 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/TextControl.cs @@ -3908,8 +3908,8 @@ namespace System.Windows.Forms { private void owner_HandleCreated(object sender, EventArgs e) { using (var graphics = owner.CreateGraphics()) { - RecalculateDocument(graphics); dpi = (graphics.DpiX + graphics.DpiY) / 2; + RecalculateDocument(graphics); } AlignCaret(); } |