diff --git a/Documents/Changelog/Changelog.md b/Documents/Changelog/Changelog.md index a9ad9f584..9abc30957 100644 --- a/Documents/Changelog/Changelog.md +++ b/Documents/Changelog/Changelog.md @@ -3,6 +3,7 @@ ======= ## 2025-11-xx - Build 2511 - November 2025 +* Resolved [#1964](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1964), `KryptonTreeView` Node crosses are not Dpi Scaled * Implemented [#1968](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1968), Open up 'ExceptionHandler' for public use - To invoke, use `KryptonExceptionHandler` * Resolved [#560](https://github.com/Krypton-Suite/Standard-Toolkit/issues/560), CheckBox Images are not scaled with dpi Awareness @@ -43,6 +44,7 @@ ======= ## 2025-02-01 - Build 2502 (Version 95 - Patch 1) - February 2025 +* Resolved [#1964](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1964), `KryptonTreeView` Node crosses are not Dpi Scaled * Resolved [#560](https://github.com/Krypton-Suite/Standard-Toolkit/issues/560), CheckBox Images are not scaled with dpi Awareness * Resolved [#565](https://github.com/Krypton-Suite/Standard-Toolkit/issues/565), GroupBox icons are not scaled for dpi awareness * Resolved [#559](https://github.com/Krypton-Suite/Standard-Toolkit/issues/559), Header group icon is not scaled for dpi awareness @@ -229,6 +231,7 @@ ======= # 2025-02-01 - Build 2502 (Patch 5) - February 2025 +* Resolved [#1964](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1964), `KryptonTreeView` Node crosses are not Dpi Scaled * Resolved [#560](https://github.com/Krypton-Suite/Standard-Toolkit/issues/560), CheckBox Images are not scaled with dpi Awareness * Resolved [#565](https://github.com/Krypton-Suite/Standard-Toolkit/issues/565), GroupBox icons are not scaled for dpi awareness * Resolved [#559](https://github.com/Krypton-Suite/Standard-Toolkit/issues/559), Header group icon is not scaled for dpi awareness diff --git a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTreeView.cs b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTreeView.cs index 59b3a9aab..4167bb153 100644 --- a/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTreeView.cs +++ b/Source/Krypton Components/Krypton.Toolkit/Controls Toolkit/KryptonTreeView.cs @@ -2272,6 +2272,10 @@ private void OnTreeViewDrawNode(object? sender, DrawTreeNodeEventArgs e) Image? drawImage = _redirectImages!.GetTreeViewImage(e.Node.IsExpanded); if (drawImage != null) { + float dpiFactor = g.DpiX / 96F; + drawImage = CommonHelper.ScaleImageForSizedDisplay(drawImage, + drawImage.Width * dpiFactor, + drawImage.Height * dpiFactor, false)!; g.DrawImage(drawImage, new Rectangle(indentBounds.X + ((indentBounds.Width - drawImage.Width) / 2) - 1, indentBounds.Y + ((indentBounds.Height - drawImage.Height) / 2), drawImage.Width, drawImage.Height)); @@ -2335,6 +2339,10 @@ private void OnTreeViewDrawNode(object? sender, DrawTreeNodeEventArgs e) if (drawImage != null) { + float dpiFactor = g.DpiX / 96F; + drawImage = CommonHelper.ScaleImageForSizedDisplay(drawImage, + drawImage.Width * dpiFactor, + drawImage.Height * dpiFactor, false)!; g.DrawImage(drawImage, _layoutImage.ClientRectangle); } } @@ -2349,6 +2357,10 @@ private void OnTreeViewDrawNode(object? sender, DrawTreeNodeEventArgs e) { if (drawStateImage != null) { + float dpiFactor = g.DpiX / 96F; + drawStateImage = CommonHelper.ScaleImageForSizedDisplay(drawStateImage, + drawStateImage.Width * dpiFactor, + drawStateImage.Height * dpiFactor, false)!; g.DrawImage(drawStateImage, _layoutImageState.ClientRectangle); } }