Skip to content

* Refresh ribbon caption icon when palette changes (V105 LTS) - #4079

Open
PWagner1 wants to merge 3 commits into
V105-LTSfrom
V105-LTS-4061-code-todo-call-this-function-when-palette-is-changing
Open

* Refresh ribbon caption icon when palette changes (V105 LTS)#4079
PWagner1 wants to merge 3 commits into
V105-LTSfrom
V105-LTS-4061-code-todo-call-this-function-when-palette-is-changing

Conversation

@PWagner1

Copy link
Copy Markdown
Contributor

Fix: Refresh ribbon caption icon when palette changes (#4061)

Summary

When the ribbon palette/theme changes, RibbonShape can change (e.g. Office 2007 ↔ Office 2010/Microsoft 365/macOS). The form caption icon visibility (AllowIconDisplay) and QAT Above visibility now update immediately via KryptonRibbon.OnPaletteChanged, instead of waiting for a form resize or chrome event.

Related issues

Type of change

  • Bug fix (Resolved)
  • Feature / enhancement (Implemented)
  • Breaking change (API removal/rename, behavior change requiring migration, assembly/namespace move)
  • Documentation only

Changes

  • KryptonRibbon.OnPaletteChanged now calls CaptionArea.UpdateQAT() and CaptionArea.PerformFormChromeCheck().
  • ViewDrawRibbonCaptionArea: extracted UpdateFormAllowIconDisplay and removed the code TODO.

Affected packages & target frameworks

  • Packages: Krypton.Ribbon

Changelog

  • Entry added to Documents/Changelog/Changelog.md:
* Resolved [#4061](https://github.com/Krypton-Suite/Standard-Toolkit/issues/4061), Ribbon caption form icon and QAT refresh when the palette/theme changes (no resize required)

Breaking changes & migration

None.

Checklist

  • Builds for net472 and is C# 7.3 compatible where required
  • New compiler/analyzer warnings in touched code addressed
  • Documents/Changelog/Changelog.md updated
  • TestForm demo added or updated (features / observable bug fixes)
  • Documents/Development/ guide added (substantial features)
  • Screenshots/GIFs included (UI changes)
  • Breaking-change impact and TFM notes documented above

# Fix: Refresh ribbon caption icon when palette changes (#4061)

## Summary

When the ribbon palette/theme changes, `RibbonShape` can change (e.g. Office 2007 ↔ Office 2010/Microsoft 365/macOS). The form caption icon visibility (`AllowIconDisplay`) and QAT Above visibility now update immediately via `KryptonRibbon.OnPaletteChanged`, instead of waiting for a form resize or chrome event.

## Related issues

- Closes #4061

## Type of change

- [x] Bug fix (`Resolved`)
- [ ] Feature / enhancement (`Implemented`)
- [ ] **Breaking change** (API removal/rename, behavior change requiring migration, assembly/namespace move)
- [ ] Documentation only

## Changes

- `KryptonRibbon.OnPaletteChanged` now calls `CaptionArea.UpdateQAT()` and `CaptionArea.PerformFormChromeCheck()`.
- `ViewDrawRibbonCaptionArea`: extracted `UpdateFormAllowIconDisplay` and removed the code TODO.

## Affected packages & target frameworks

- Packages: `Krypton.Ribbon`
- TFMs verified: project default Debug build of `Krypton.Ribbon` / `TestForm`

## Validation

- TestForm demo: `Bug4061RibbonCaptionIconThemeDemo` (registered in `StartScreen.AddButtons()`).
- Manual steps:
  1. Open **Bug 4061 Ribbon caption icon on theme change**.
  2. Switch to an Office 2007 theme with File app button visible — form icon should hide without resizing.
  3. Switch to Office 2010 / Microsoft 365 / macOS / OS X Aqua — form icon should show; QAT Above should hide under macOS shapes.
  4. Confirm the status line `AllowIconDisplay` / `RibbonShape` values match the caption.
- Build: `dotnet build ".\Source\Krypton Components\Krypton.Ribbon\Krypton.Ribbon 2022.csproj" -c Debug`

## Changelog

- Entry added to `Documents/Changelog/Changelog.md`:

```markdown
* Resolved [#4061](#4061), Ribbon caption form icon and QAT refresh when the palette/theme changes (no resize required)
```

## Breaking changes & migration

None.

## Checklist

- [x] Builds for `net472` and is C# 7.3 compatible where required
- [x] New compiler/analyzer warnings in touched code addressed
- [x] `Documents/Changelog/Changelog.md` updated
- [x] TestForm demo added or updated (features / observable bug fixes)
- [ ] `Documents/Development/` guide added (substantial features)
- [ ] Screenshots/GIFs included (UI changes)
- [x] Breaking-change impact and TFM notes documented above
@PWagner1 PWagner1 added this to the Version 105 (LTS) milestone Jul 26, 2026
@PWagner1
PWagner1 requested a review from a team as a code owner July 26, 2026 06:51
@PWagner1 PWagner1 added area:themes All things to do with themes. area:ribbon All issues to do with the ribbon. version:105-lts All things to do with V105 LTS. labels Jul 26, 2026
@PWagner1 PWagner1 linked an issue Jul 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:ribbon All issues to do with the ribbon. area:themes All things to do with themes. version:105-lts All things to do with V105 LTS.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Code ToDo]: call this function when palette is changing

1 participant