Bug 469708 - Icon on focused QToolButton gets inverted
Summary: Icon on focused QToolButton gets inverted
Status: ASSIGNED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (other bugs)
Version First Reported In: 5.27.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-05-13 16:52 UTC by Sebastian Friedl
Modified: 2025-07-01 09:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
Comparison: Behavior of QPushButton/QToolButton widgets with keyboard focus (32.96 KB, image/png)
2023-05-13 16:52 UTC, Sebastian Friedl
Details
Source code of demo application used for creating the attached comparison (1.06 KB, text/x-c++src)
2023-05-13 16:54 UTC, Sebastian Friedl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sebastian Friedl 2023-05-13 16:52:02 UTC
Created attachment 158914 [details]
Comparison: Behavior of QPushButton/QToolButton widgets with keyboard focus

SUMMARY
When a QToolButton has keyboard focus (and is not below the cursor), its icon gets inverted, making it barely visible.

STEPS TO REPRODUCE
1. Set color scheme to classic Breeze or Breeze Light
2. Find a QToolButton with an icon
3. Use Tab key to move focus to that button
4. Move the cursor so that its position is not above the focused button

OBSERVED RESULT
Icon of tool button gets inverted, making it barely visible.

EXPECTED RESULT
Icon of tool button is not inverted.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.105.0
Qt Version: 5.15.9
Graphics Platform: X11

ADDITIONAL INFORMATION
- See attached image for an comparison of QPushButton/QToolButton and focus/hover+focus states
- The behavior does not occur with the Breeze Dark color scheme
Comment 1 Sebastian Friedl 2023-05-13 16:54:12 UTC
Created attachment 158915 [details]
Source code of demo application used for creating the attached comparison
Comment 2 Nate Graham 2023-05-15 18:21:59 UTC
Can you reproduce this issue in any KDE apps? I am unable to when I try.
Comment 3 Sebastian Friedl 2023-05-17 12:14:52 UTC
(In reply to Nate Graham from comment #2)
> Can you reproduce this issue in any KDE apps? I am unable to when I try.

At first I only observed this behavior while writing own apps using code like in the attached C++ file.

Prompted by your comment, and after some search, I also found an example in Kate/KWrite (both v23.04.1):
Under "Settings" > "Configure Kate" > "Open/Save" > "Modes & Filetypes", the magic wand buttons next to the "Variables" and "MIME types" fields also show the described behavior.
Comment 4 Nate Graham 2023-05-17 14:03:52 UTC
Can reproduce the issue there too, thanks.
Comment 5 Bug Janitor Service 2025-07-01 09:52:08 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/549