kstyle: Add QFocusFrame to non-view/delegate interactive widgets
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().
breeze-focusframes-mrvid-2021-09-22_16.28.02
Things I need to add support for:
-
group box checkboxes (thanks @nyanpasu)
Edited by Noah Davis