Skip to content

Replace QAction menu with custom QToolButton tray menu + inline Color/Effects/Clear buttons #2019

Description

@Snaiper-hub

Feature request

What problem does this feature solve?

The current system tray context menu uses native QAction items, which offer no control over icon/text spacing, padding, or dark-theme styling. On dark Windows themes the icons are black-on-black and nearly invisible. Additionally, the first LED instance is buried inside a submenu (Instance → Color/Effects/Clear), requiring extra clicks for frequent operations.

What does the proposed API look like?

QAction → QToolButton + QWidgetAction for all menu items
New helper QIcon recoloredIcon(svgPath, color, size) for per-pixel icon recoloring
New members in SysTray: _darkTheme, _firstInstanceAction, _firstInstanceNumber, _firstEffectsMenu, _lastColor

How should this be implemented in your opinion?

Replace QAction-based createAction() with QToolButton-based QWidgetAction to gain full QSS control over padding and spacing
For the first LED instance, render Color/Effects/Clear as a horizontal row of 26×26 icon buttons directly in the main menu (before Settings), with a 4px colored indicator strip below each button
Auto-detect dark theme via QPalette::Window lightness and apply matching stylesheet + white icons
Recolor SVG icons per-pixel at render time for reliable dark/light output without Qt6-deprecated setIsMask()

Are you willing to work on this yourself?

Yes — implementation and patch attached.

Replace-QAction-menu-with-custom-QToolButton-tray-me.patch

Image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions