Skip to content

kstyle: Add QFocusFrame to non-view/delegate interactive widgets

Noah Davis requested to merge work/ndavis/focusframe into master

There are 2 parts that contain the bulk of the code in this patch.

Style::event() is used to apply the QFocusFrame to a widget when it gets focus with a keyboard input related focus reason. If the focused widget has a focusProxy, this makes sure the QFocusFrame is applied to the focusProxy instead.

Style::drawFocusFrame() is mostly what you'd expect. It draws a focus frame based on the type of widget the QFocusFrame was applied to. I had to do a workaround for QFocusFrame not fully repainting outside the bounds of QSliders and QDials when the handle moves though. What I do is check if _focusFrame is defined and then _focusFrame->update().

BUG: 443469

breeze-focusframes-mrvid-2021-09-22_16.28.02

@teams/vdg @teams/usability


Things I need to add support for:

Edited by Noah Davis

Merge request reports

Loading