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 #1950

Merged
merged 1 commit into from
Dec 16, 2024
Merged
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
- Put the code in to scale the ButtonSpec image
- TestForm designer changes..

#1946
  • Loading branch information
Smurf-IV committed Dec 16, 2024
commit fcfd0e19c9613a91864c0fbddcd463e3f478b732
3 changes: 3 additions & 0 deletions Documents/Changelog/Changelog.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@
=======

## 2025-11-xx - Build 2511 - November 2025
* Resolved [#1946](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1946), ButtonSpecs do not scale anymore!
* Resolved [#1940](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1940), In V95 KContextMenuItem no longer stores the Text value in the designer !!
* Resolved [#1938](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1938), `KryptonTextBox` CueHint Text* Implemented [#1928](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1928), A proper exception dialog
- To invoke, use `KryptonExceptionDialog`
@@ -36,6 +37,7 @@
=======

## 2025-02-01 - Build 2502 (Version 95 - Patch 1) - February 2025
* Resolved [#1946](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1946), ButtonSpecs do not scale anymore!
* Resolved [#1940](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1940), In V95 KContextMenuItem no longer stores the Text value in the designer !!
* Resolved [#1938](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1938), `KryptonTextBox` CueHint Text
* Resolved [#1905](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1905), `Sparkle` Themes have an issue with the Background
@@ -218,6 +220,7 @@
=======

# 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 [#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 [#1910](https://github.com/Krypton-Suite/Standard-Toolkit/issues/1910), `Workspace Persistence` -> "Save to array" Causes an exception in `Toolkit.XmlHelper.Image.Save`
Original file line number Diff line number Diff line change
@@ -319,12 +319,12 @@ 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);
Image? 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;
return (baseImage != null)
? CommonHelper.ScaleImageForSizedDisplay(baseImage, baseImage.Width * _controller!.Target.FactorDpiX,
baseImage.Height * _controller!.Target.FactorDpiY)
: null;
}

/// <summary>
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ namespace Krypton.Toolkit
public class KryptonContextMenuHeading : KryptonContextMenuItemBase
{
#region Instance Fields
private string? _extraText;
private string _extraText;
private Image? _image;
private Color _imageTransparentColor;
private readonly PaletteRedirectTriple _redirectHeading;
@@ -165,17 +165,17 @@ public string Text
[Description(@"Heading menu item extra text.")]
[Editor(typeof(MultilineStringEditor), typeof(UITypeEditor))]
[Localizable(true)]
[DefaultValue(null)]
[DefaultValue("")]
[AllowNull]
public string ExtraText
{
get => _extraText ?? string.Empty;
get => _extraText;

set
{
if (_extraText != value)
{
_extraText = value;
_extraText = value ?? string.Empty;
OnPropertyChanged(new PropertyChangedEventArgs(nameof(ExtraText)));
}
}
@@ -224,7 +224,7 @@ public Color ImageTransparentColor
}
}

private bool ShouldSerializeImageTransparentColor() => (_imageTransparentColor == null) || !_imageTransparentColor.Equals(GlobalStaticValues.EMPTY_COLOR);
private bool ShouldSerializeImageTransparentColor() => !_imageTransparentColor.Equals(GlobalStaticValues.EMPTY_COLOR);

/// <summary>
/// Gets access to the header instance specific appearance values.
Loading