diff --git a/CHANGELOG.md b/CHANGELOG.md index a79b0c316..dc322a693 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ - Bugfix: Fixed an issue where it was difficult to hover a zero-width emote. (#4314) - Bugfix: Fixed an issue where context-menu items for zero-width emotes displayed the wrong provider. (#4460) - Bugfix: Fixed an issue where the "Enable zero-width emotes" setting was showing the inverse state. (#4462) +- Bugfix: Fixed username rendering in Qt 6. (#4476) - Dev: Disabling precompiled headers on Windows is now tested in CI. (#4472) - Dev: Ignore unhandled BTTV user-events. (#4438) - Dev: Only log debug messages when NDEBUG is not defined. (#4442) diff --git a/src/singletons/Fonts.cpp b/src/singletons/Fonts.cpp index 08c00ca39..d5325cdd0 100644 --- a/src/singletons/Fonts.cpp +++ b/src/singletons/Fonts.cpp @@ -25,10 +25,13 @@ namespace chatterino { namespace { int getBoldness() { -#ifdef CHATTERINO - return getSettings()->boldScale.getValue(); +#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) + // This setting uses the Qt 5 range of the font-weight (0..99). + // The range in Qt 6 is 1..1000. + return (int)(1.0 + + (111.0 * getSettings()->boldScale.getValue()) / 11.0); #else - return QFont::Bold; + return getSettings()->boldScale.getValue(); #endif } } // namespace