Skip to content

Use the theme colour for a command menu icon that has no colour - #477

Open
luapmartin wants to merge 1 commit into
musescore:mainfrom
luapmartin:luapmartin/menu-item-icon-color
Open

luapmartin wants to merge 1 commit into
musescore:mainfrom
luapmartin:luapmartin/menu-item-icon-color

Conversation

@luapmartin

@luapmartin luapmartin commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Resolves: audacity/audacity#12951

  • Menu icons of commands without an icon colour follow the theme colour
  • I signed the CLA.
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.

Complete only if applicable:

  • I created a unit test or vtest to verify the changes I made.
  • This PR was created using AI assistance; I have read, understood and complied following the guidelines for AI-assisted contributions. The AI tool(s) I used are listed below.

🤖 Generated with Claude Code

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

A command without an icon colour gave the menu item "#000000", so its
icon stayed black in every theme when shown next to the check mark.

Assisted-by: Claude Fable 5.2
@coderabbitai

coderabbitai Bot commented Dec 1, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

ThemeApi adds a read-only QML property and accessor for the configured high-contrast mode. MenuItem now stores an empty string when a command decoration has an invalid icon color.

Merge Risk: Minimal · up to 346d3

This change makes menu icons follow the theme and exposes a high-contrast flag to QML. No actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title states the main change: command menu icons without an explicit icon colour now use the theme colour. The raw summary confirms that MenuItem::setCommandInfo stores iconColor as an empty strin…
Description check Passed The description follows the repository template. It includes the 'Resolves' line with issue audacity/audacity#12951 and a short statement of the change (menu icons without an icon colour follow the th…
Full details: Title check

Explanation

The title states the main change: command menu icons without an explicit icon colour now use the theme colour. The raw summary confirms that MenuItem::setCommandInfo stores iconColor as an empty string when the command decoration colour is invalid, which matches the title's purpose. The title is specific and concise, and a teammate scanning history would understand the primary change.

Full details: Description check

Explanation

The description follows the repository template. It includes the 'Resolves' line with issue audacity/audacity#12951 and a short statement of the change (menu icons without an icon colour follow the theme colour). The checklist is filled in. The template's build configuration section is also present. Unchecked items are the 'No prior attempts' item and the unit test item, which the template allows for the test item. The motivation is brief, but the description is mostly complete.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 64818d8 and 346d322.

Files selected for processing: 3

  • framework/ui/api/themeapi.cpp
  • framework/ui/api/themeapi.h
  • framework/uicomponents/qml/Muse/UiComponents/menuitem.cpp

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@luapmartin luapmartin changed the title Menu icons follow the theme; expose isHighContrast on the QML theme Fix Menu icons colours and expose isHighContrast Dec 1, 2026
@luapmartin luapmartin self-assigned this Dec 1, 2026
@luapmartin
luapmartin force-pushed the luapmartin/menu-item-icon-color branch from 346d322 to 352a1a6 Compare December 2, 2026 16:27
@luapmartin luapmartin changed the title Fix Menu icons colours and expose isHighContrast Use the theme colour for a command menu icon that has no colour Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Menu icons, the meter peak marker and timecode fields ignore the theme colours

1 participant