Verified Commit 0f4b3205 authored by Ingo Klöcker's avatar Ingo Klöcker Committed by Ingo Klöcker
Browse files

Draw focus indicator for labels only if focus was changed with keyboard

Many Qt styles, e.g. the Windows style and the Fusion style, don't draw
the FrameFocusRect primitive if the focus wasn't changed with the keyboard.
Other applications also behave like this. So, we don't add a focus frame
unless the widget received focus by the keyboard.

GnuPG-bug-id: 6111
parent 5b165a2d
Pipeline #232248 passed with stage
in 4 minutes and 34 seconds
......@@ -280,7 +280,7 @@ public:
void updateFocusFrame(QWidget *focusWidget)
if (focusWidget && focusWidget->inherits("QLabel")) {
if (focusWidget && focusWidget->inherits("QLabel") && focusWidget->window()->testAttribute(Qt::WA_KeyboardFocusChange)) {
if (!focusFrame) {
focusFrame = new FocusFrame{focusWidget};
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment