Bug 467824 - CheckBox, RadioButton keyboard focus rect does not cover icon
Summary: CheckBox, RadioButton keyboard focus rect does not cover icon
Status: RESOLVED FIXED
Alias: None
Product: Breeze
Classification: Plasma
Component: QStyle (other bugs)
Version First Reported In: master
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-26 19:09 UTC by ratijas
Modified: 2023-04-03 20:09 UTC (History)
2 users (show)

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


Attachments
Breeze icon-only controls and their keyboard focus indicator (24.27 KB, video/mp4)
2023-03-26 19:09 UTC, ratijas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ratijas 2023-03-26 19:09:00 UTC
Created attachment 157598 [details]
Breeze icon-only controls and their keyboard focus indicator

SUMMARY

With Breeze style, keyboard focus indicator (solid underline) on CheckBox and RadioButton controls (both QtWidgets and QQC2 via qqc2-desktop-style bridge) only covers text label but not the icon. If a button is icon-only (no text), then focus indicator is practically invisible because it has a width of zero.

STEPS TO REPRODUCE
1. Create a CheckBox and RadioButton with an icon but without text string.
2. Tab-navigate to it.

OBSERVED RESULT
Keyboard focus right is present, but underline indicator is invisible (zero-sized).

EXPECTED RESULT
In Fusion style, focus rect covers icon and label with a subtle gradient. In MS Windows 9x style, a dotted rectangle outline is drawn around both icon and label. In Oxygen, there are no icon/text indicators at all, unfortunately.

So, an average expected behavior is to highlight an icon alongside the text label.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: git Plasma/5.27
KDE Frameworks Version: git kf5
Qt Version: 5.15.8
Kernel Version: 6.2.7-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: G752VT
System Version: 1.0
Comment 1 Bug Janitor Service 2023-03-30 23:13:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/301
Comment 2 Bug Janitor Service 2023-04-02 22:48:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/breeze/-/merge_requests/305
Comment 3 ratijas 2023-04-03 20:07:11 UTC
Git commit e5f913a2f0c01f2002a7ec0cc01b061a205a8d7c by ivan tkachenko.
Committed on 02/04/2023 at 22:46.
Pushed by ratijas into branch 'master'.

CheckBox,RadioButton: Extend focus line to cover an icon too

This is consistent with Fusion and MS Window 9x styles.

M  +29   -16   kstyle/breezestyle.cpp

https://invent.kde.org/plasma/breeze/commit/e5f913a2f0c01f2002a7ec0cc01b061a205a8d7c
Comment 4 ratijas 2023-04-03 20:09:33 UTC
Git commit cd75ecd72a9d058f9fb2b2b10f74c0d98ef71aba by ivan tkachenko.
Committed on 02/04/2023 at 22:49.
Pushed by ratijas into branch 'Plasma/5.27'.

CheckBox,RadioButton: Extend focus line to cover an icon too

This is consistent with Fusion and MS Window 9x styles.
(cherry picked from commit e5f913a2f0c01f2002a7ec0cc01b061a205a8d7c)

M  +29   -16   kstyle/breezestyle.cpp

https://invent.kde.org/plasma/breeze/commit/cd75ecd72a9d058f9fb2b2b10f74c0d98ef71aba