Home GnuPG

qt5: Add dark mode icon variants and detection

Description

qt5: Add dark mode icon variants and detection

* qt5/icons/hint_dark.svg, qt5/icons/password-generate_dark.svg,
qt5/icons/visibility_dark.svg: New.
* qt5/icons/Makefile.am (EXTRA_DIST): Add icons.
* qt5/pinentrydialog.cpp (PinEntryDialog::PinEntryDialog):
Check if colorScheme is dark. Use Icons accordingly.
* qt5/pinentrydialog.h (PinentryDialog): Add icon suffix member
variable.
* qt5/pinentryrc.qrc: Add new icons.

This is a backport of f4be34f83fd2079fa452525738ef19783c712438 for Qt 5.
Instead of using QGuiApplication::styleHints()::colorScheme() (which
didn't exist before Qt 6.5) we calculate the luminance of the button
color to check for dark mode.