mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-07-25 07:45:22 -04:00
Use specific monospace fonts as fallback on Mac OS X.
Qt (4.8.6) doesn't seem to be able to resolve the generic monospace font family. Closes #214
This commit is contained in:
parent
4cdb9a645d
commit
87468b648b
2 changed files with 12 additions and 1 deletions
|
@ -45,7 +45,13 @@ void PasswordComboBox::setEcho(bool echo)
|
|||
// add fake item to show visual indication that a popup is available
|
||||
addItem("");
|
||||
|
||||
setStyleSheet("QComboBox { font-family: monospace; }");
|
||||
#ifdef Q_OS_MAC
|
||||
// Qt on Mac OS doesn't seem to know the generic monospace family (tested with 4.8.6)
|
||||
setStyleSheet("QComboBox { font-family: monospace,Menlo,Monaco; }");
|
||||
#else
|
||||
setStyleSheet("QComboBox { font-family: monospace,Courier; }");
|
||||
#endif
|
||||
|
||||
}
|
||||
else {
|
||||
// clear items so the combobox indicates that no popup menu is available
|
||||
|
|
|
@ -56,7 +56,12 @@ void PasswordEdit::updateStylesheet()
|
|||
QString stylesheet("QLineEdit { ");
|
||||
|
||||
if (echoMode() == QLineEdit::Normal) {
|
||||
#ifdef Q_OS_MAC
|
||||
// Qt on Mac OS doesn't seem to know the generic monospace family (tested with 4.8.6)
|
||||
stylesheet.append("font-family: monospace,Menlo,Monaco; ");
|
||||
#else
|
||||
stylesheet.append("font-family: monospace; ");
|
||||
#endif
|
||||
}
|
||||
|
||||
if (m_basePasswordEdit && !passwordsEqual()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue