mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
Fix Username Font Weight Issue on Qt 6 (#4476)
This commit is contained in:
parent
19cc72f927
commit
d59076520a
2 changed files with 7 additions and 3 deletions
|
@ -9,6 +9,7 @@
|
||||||
- Bugfix: Fixed an issue where it was difficult to hover a zero-width emote. (#4314)
|
- 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 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 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: Disabling precompiled headers on Windows is now tested in CI. (#4472)
|
||||||
- Dev: Ignore unhandled BTTV user-events. (#4438)
|
- Dev: Ignore unhandled BTTV user-events. (#4438)
|
||||||
- Dev: Only log debug messages when NDEBUG is not defined. (#4442)
|
- Dev: Only log debug messages when NDEBUG is not defined. (#4442)
|
||||||
|
|
|
@ -25,10 +25,13 @@ namespace chatterino {
|
||||||
namespace {
|
namespace {
|
||||||
int getBoldness()
|
int getBoldness()
|
||||||
{
|
{
|
||||||
#ifdef CHATTERINO
|
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
|
||||||
return getSettings()->boldScale.getValue();
|
// 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
|
#else
|
||||||
return QFont::Bold;
|
return getSettings()->boldScale.getValue();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
Loading…
Reference in a new issue