Commit 398cc4db authored by Ingo Klöcker's avatar Ingo Klöcker
Browse files

Force visual focus of button with input focus when window is shown

Breeze style (and some other styles) does not show a visual indication
that a button has keyboard focus in a newly opened window. Explicitly
set the WA_KeyboardFocusChange attribute to force visual focus of the
button that has focus when the wizard is shown without protocol.

GnuPG-bug-id: 5832
parent 30495ab9
Pipeline #146782 failed with stage
in 3 minutes and 56 seconds
......@@ -1288,11 +1288,19 @@ private:
NewCertificateWizard::NewCertificateWizard(QWidget *p)
: QWizard(p), d(new Private(this))
{
}
NewCertificateWizard::~NewCertificateWizard() {}
void NewCertificateWizard::showEvent(QShowEvent *event)
{
// set WA_KeyboardFocusChange attribute to force visual focus of the
// focussed button when the wizard is shown (required for Breeze style
// and some other styles)
window()->setAttribute(Qt::WA_KeyboardFocusChange);
QWizard::showEvent(event);
}
void NewCertificateWizard::setProtocol(Protocol proto)
{
d->initialProtocol = proto;
......
......@@ -43,6 +43,9 @@ public:
NumPages
};
protected:
void showEvent(QShowEvent *event) override;
private:
void resetProtocol();
void restartAtEnterDetailsPage();
......
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