MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / widgetFont

Method widgetFont

app/src/Misc/CommonFonts.cpp:217–225  ·  view source on GitHub ↗

* @brief Builds a widget font scaled by fraction and the global widget scale. */

Source from the content-addressed store, hash-verified

215 * @brief Builds a widget font scaled by fraction and the global widget scale.
216 */
217QFont 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

Callers 4

renderAxisLayerMethod · 0.80
computePlotRectMethod · 0.80
drawYAxisMethod · 0.80
drawCursorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected