Skip to content

Commit

Permalink
- Put the code in to scale the ButtonSpec image
Browse files Browse the repository at this point in the history
  • Loading branch information
Smurf-IV committed Dec 16, 2024
1 parent 2fd8bd3 commit e20a777
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
=======

# 2025-02-01 - Build 2502 (Patch 5) - February 2025
* Resolved [#1946](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1946), ButtonSpecs do not scale anymore!
* Resolved [#1890](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1890), V85 codebase: Exception thrown for colouring a ribbon
* Resolved [#1905](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1905), `Sparkle` Themes have an issue with the Background
* Resolved [#980](https://github.com/Krypton-Suite/Standard-Toolkit/issues/980), `KryptonDockableNavigator` with pages without `AllowConfigSave` flag are incorrectly saved
* Resolved [#1909](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1909), `KryptonDataGridViewComboBoxCell` displays an empty drop-down list on the first new row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Development", "Development"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Help", "Help", "{C2B58A1A-4451-4A21-8487-14DBA720672D}"
ProjectSection(SolutionItems) = preProject
..\..\Documents\Help\Changelog.md = ..\..\Documents\Help\Changelog.md
..\..\Documents\Help\Designer-Fix.md = ..\..\Documents\Help\Designer-Fix.md
EndProjectSection
EndProject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -330,12 +330,11 @@ protected virtual void OnFinishDelegate(object sender, EventArgs? e) =>
public Image? GetImage(PaletteState state)
{
// Get value from button spec passing inheritance redirector
var baseImage = ButtonSpec.GetImage(_redirector, state);

// No need to perform scaling as it will be done @
// $\Standard-Toolkit\Source\Krypton Components\Krypton.Toolkit\Rendering\RenderStandard.cs
// line 5779: memento.Image = CommonHelper.ScaleImageForSizedDisplay(memento.Image, currentWidth, currentHeight);
return baseImage;
Image? baseImage = ButtonSpec.GetImage(_redirector, state);
return (baseImage != null)
? CommonHelper.ScaleImageForSizedDisplay(baseImage, baseImage.Width * _controller.Target.FactorDpiX,
baseImage.Height * _controller.Target.FactorDpiY)
: null;
}

/// <summary>
Expand Down

0 comments on commit e20a777

Please sign in to comment.