diff --git a/src/controls/QskSkin.cpp b/src/controls/QskSkin.cpp index 416f7a0a..51de03f0 100644 --- a/src/controls/QskSkin.cpp +++ b/src/controls/QskSkin.cpp @@ -344,8 +344,15 @@ void QskSkin::completeFontTable() continue; } - int weight = normalFont.weight() + ( j - 2 ) * 100; - weight = qBound( 0, weight, 900 ); +#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 ) + const auto step = 10; // weight: [0-99] +#else + const auto step = 100; // weight: [1-1000] +#endif + + int weight = normalFont.weight() + ( j - 2 ) * step; + weight = qBound( static_cast( QFont::Thin ), + weight, static_cast( QFont::Black ) ); auto font = normalFont; font.setWeight( static_cast< QFont::Weight >( weight ) );