Home GnuPG

qt: Ensure visual feedback when a text label gets focus

Description

qt: Ensure visual feedback when a text label gets focus

qt/pinentrydialog.cpp (class TextLabel): New.
qt/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog): Set text format
of all text labels to PlainText. Change all text labels that shall be
able to receive focus from QLabel to TextLabel.
(PinEntryDialog::setFormattedPassphrase): Set text format of

mFormattedPassphraseHint to RichText.

Unfortunately, many (all?) Qt styles do not give visual feedback if a
(text) label gets keyboard focus. As workaround, we select the text of
the label that got focus. We set the text format of all text labels
initially to plain text. This prevents the labels from accidentally
interpreting their text as rich text and enables us to determine the
"visual" length of their texts.

Details

Provenance
ikloeckerAuthored on Mar 1 2022, 10:26 AM
Parents
rP50ad2196d3f6: qt: Make text labels focusable if accessibility is active
Branches
Unknown
Tags
Unknown
Tasks
T5863: pinentry-qt: Further improve the accessibility