Fix Username Font Weight Issue on Qt 6 (#4476)

This commit is contained in:
nerix
2023-03-25 11:57:06 +01:00
committed by GitHub
parent 19cc72f927
commit d59076520a
2 changed files with 7 additions and 3 deletions
+6 -3
View File
@@ -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