fix: macos font multiplier (#5775)
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
## Unversioned
|
## Unversioned
|
||||||
|
|
||||||
- Bugfix: Fixed scrollbar highlights being visible in overlay windows. (#5769)
|
- Bugfix: Fixed scrollbar highlights being visible in overlay windows. (#5769)
|
||||||
|
- Bugfix: Make macos fonts look the same as v2.5.1. (#5775)
|
||||||
- Dev: Hard-code Boost 1.86.0 in macos CI builders. (#5774)
|
- Dev: Hard-code Boost 1.86.0 in macos CI builders. (#5774)
|
||||||
|
|
||||||
## 2.5.2-beta.1
|
## 2.5.2-beta.1
|
||||||
|
|||||||
+36
-13
@@ -139,20 +139,43 @@ Fonts::FontData Fonts::createFontData(FontStyle type, float scale)
|
|||||||
|
|
||||||
// normal Ui font (use pt size)
|
// normal Ui font (use pt size)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
constexpr float multiplier = 0.8f;
|
|
||||||
#else
|
|
||||||
constexpr float multiplier = 1.f;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static std::unordered_map<FontStyle, UiFontData> defaultSize{
|
static std::unordered_map<FontStyle, UiFontData> defaultSize{
|
||||||
{FontStyle::Tiny, {8, "Monospace", false, QFont::Normal}},
|
{
|
||||||
{FontStyle::UiMedium,
|
FontStyle::Tiny,
|
||||||
{int(9 * multiplier), DEFAULT_FONT_FAMILY, false, QFont::Normal}},
|
{
|
||||||
{FontStyle::UiMediumBold,
|
8,
|
||||||
{int(9 * multiplier), DEFAULT_FONT_FAMILY, false, QFont::Bold}},
|
"Monospace",
|
||||||
{FontStyle::UiTabs,
|
false,
|
||||||
{int(9 * multiplier), DEFAULT_FONT_FAMILY, false, QFont::Normal}},
|
QFont::Normal,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
FontStyle::UiMedium,
|
||||||
|
{
|
||||||
|
9,
|
||||||
|
DEFAULT_FONT_FAMILY,
|
||||||
|
false,
|
||||||
|
QFont::Normal,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
FontStyle::UiMediumBold,
|
||||||
|
{
|
||||||
|
9,
|
||||||
|
DEFAULT_FONT_FAMILY,
|
||||||
|
false,
|
||||||
|
QFont::Bold,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
FontStyle::UiTabs,
|
||||||
|
{
|
||||||
|
9,
|
||||||
|
DEFAULT_FONT_FAMILY,
|
||||||
|
false,
|
||||||
|
QFont::Normal,
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
UiFontData &data = defaultSize[type];
|
UiFontData &data = defaultSize[type];
|
||||||
|
|||||||
Reference in New Issue
Block a user