From 1647b0b76a3352f5d9b2892441eeaf002256a481 Mon Sep 17 00:00:00 2001 From: Ilya Fedin Date: Sat, 25 Apr 2020 21:03:42 +0400 Subject: [PATCH] Fix setWeight order --- ui/style/style_core_font.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ui/style/style_core_font.cpp b/ui/style/style_core_font.cpp index 0cd6580..88c359b 100644 --- a/ui/style/style_core_font.cpp +++ b/ui/style/style_core_font.cpp @@ -288,18 +288,18 @@ FontData::FontData(int size, uint32 flags, int family, Font *other) f.setFamily(GetFontOverride(flags)); } -#ifdef DESKTOP_APP_USE_PACKAGED_FONTS - if (_flags & FontSemibold) { - f.setWeight(QFont::DemiBold); - } -#endif // DESKTOP_APP_USE_PACKAGED_FONTS - f.setPixelSize(size); f.setBold(_flags & FontBold); f.setItalic(_flags & FontItalic); f.setUnderline(_flags & FontUnderline); f.setStrikeOut(_flags & FontStrikeOut); +#ifdef DESKTOP_APP_USE_PACKAGED_FONTS + if (_flags & FontSemibold) { + f.setWeight(QFont::DemiBold); + } +#endif // DESKTOP_APP_USE_PACKAGED_FONTS + m = QFontMetrics(f); height = m.height(); ascent = m.ascent();