Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- Put the code in to scale the ButtonSpec image #1947

Merged
merged 1 commit into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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