* @brief Creates a custom monospace font with specified size and boldness. */
| 141 | * @brief Creates a custom monospace font with specified size and boldness. |
| 142 | */ |
| 143 | QFont Misc::CommonFonts::customMonoFont(const double fraction, const bool bold) |
| 144 | { |
| 145 | QFont font = m_monoFont; |
| 146 | font.setPointSizeF(m_monoFont.pointSizeF() * qMax(0.1, fraction)); |
| 147 | if (bold) |
| 148 | font.setWeight(QFont::Medium); |
| 149 | |
| 150 | return font; |
| 151 | } |
| 152 | |
| 153 | //-------------------------------------------------------------------------------------------------- |
| 154 | // Widget font properties |
no outgoing calls
no test coverage detected