Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.5.3
-
None
-
-
63e248aae7aecce2299bfd7941bd37fdfc136dcf
Description
[there is no component "Widget Styles"?]
The Mac Widget Style (qmacstyle_mac.mm) doesn't draw the focus rect around lineedits when drawContents(PE_FrameLineEdit, option with QStyle::State_HasFocus) is called.
Instead, it creates a QFocusFrame around the qwidget when it gets focus.
This works ok for widgets, but it breaks other callers of drawContents(PE_FrameLineEdit), like webkit showing a form lineedit.
Webkit testcase: <input/>
Expected result: when the lineedit is focused, the standard mac blue focus-rect should be shown.
Actual result: no focus frame shown
I wanted to work on the fix for this, but it seems awfully complex/intrusive.
Any change inside the webkit code (RenderThemeQt::paintTextField) would have to be mac-specific, which seems really ugly, that code (painting the focus rect) really belongs to the widget style...
OTOH the widget style can't paint outside the given rect, inside CE_PanelLineEdit, I suppose... or can it?
Maybe that's the fix: if (!frame->widget && frame->state & State_HasFocus)
?