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

- Rename KryptonPalette to KryptonCustomPaletteBase to make it obvious what it is #911

Merged
merged 3 commits into from
Jan 21, 2023
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
1 change: 1 addition & 0 deletions Documents/Help/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
=======

## 2023-11-xx - Build 2311 - November 2023
* Complete [#827](https://github.com/Krypton-Suite/Standard-Toolkit/issues/827),Expose IPalette / PaletteBase as a public interface in KryptonManager
* Resolved [#891](https://github.com/Krypton-Suite/Standard-Toolkit/issues/891), `LabelStyle` does not appear to have a default designer value
* Implemented [#887](https://github.com/Krypton-Suite/Standard-Toolkit/issues/887), A 'LinkLabel' version of the `KryptonWrapLabel`
* Fixed the display of the initial selected theme in the "ThemeSelection ComboBox"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2704,7 +2704,7 @@ public IRenderer BaseRenderer

protected override void DefineFonts()
{
throw new NotImplementedException();
// This class has no font fields
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,13 @@ public int ThemeSelectedIndex

private bool ShouldSerializeThemeSelectedIndex() => _selectedIndex != 25;

/// <summary>
/// Gets and sets the ThemeSelectedIndex.
/// </summary>
[Category(@"Visuals")]
[Description(@"Custom Theme to use when `Custom` is selected")]
[DefaultValue(null)]
public KryptonCustomPaletteBase KryptonCustomPalette { get; set; }

[EditorBrowsable(EditorBrowsableState.Never)]
public KryptonManager Manager
Expand Down Expand Up @@ -98,6 +105,12 @@ protected override void OnSelectedIndexChanged(EventArgs e)
ThemeSelectedIndex = SelectedIndex;

base.OnSelectedIndexChanged(e);
if ((ThemeManager.GetThemeManagerMode(Text) == PaletteMode.Custom)
&& (KryptonCustomPalette != null)
)
{
Manager.GlobalPalette = KryptonCustomPalette;
}
}

#endregion
Expand Down