* Refresh ribbon caption icon when palette changes (V105 LTS) - #4079
Open
PWagner1 wants to merge 3 commits into
Open
* Refresh ribbon caption icon when palette changes (V105 LTS)#4079PWagner1 wants to merge 3 commits into
PWagner1 wants to merge 3 commits into
Conversation
# 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
…on-when-palette-is-changing
…on-when-palette-is-changing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Refresh ribbon caption icon when palette changes (#4061)
Summary
When the ribbon palette/theme changes,
RibbonShapecan change (e.g. Office 2007 ↔ Office 2010/Microsoft 365/macOS). The form caption icon visibility (AllowIconDisplay) and QAT Above visibility now update immediately viaKryptonRibbon.OnPaletteChanged, instead of waiting for a form resize or chrome event.Related issues
Type of change
Resolved)Implemented)Changes
KryptonRibbon.OnPaletteChangednow callsCaptionArea.UpdateQAT()andCaptionArea.PerformFormChromeCheck().ViewDrawRibbonCaptionArea: extractedUpdateFormAllowIconDisplayand removed the code TODO.Affected packages & target frameworks
Krypton.RibbonChangelog
Documents/Changelog/Changelog.md:Breaking changes & migration
None.
Checklist
net472and is C# 7.3 compatible where requiredDocuments/Changelog/Changelog.mdupdatedDocuments/Development/guide added (substantial features)