* @brief Builds a widget font scaled by fraction and the global widget scale. */
| 215 | * @brief Builds a widget font scaled by fraction and the global widget scale. |
| 216 | */ |
| 217 | QFont Misc::CommonFonts::widgetFont(const double fraction, const bool bold) const |
| 218 | { |
| 219 | QFont font(m_widgetFontFamily); |
| 220 | font.setPointSizeF(m_uiFont.pointSizeF() * qMax(0.1, fraction) * m_widgetFontScale); |
| 221 | if (bold) |
| 222 | font.setWeight(QFont::Medium); |
| 223 | |
| 224 | return font; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * @brief Returns the size-aware fraction for widgetFont(): 1.0 while the widget's driving |
no outgoing calls
no test coverage detected