From de89a73ff9c7575323cb61e358e8e3c8274214e4 Mon Sep 17 00:00:00 2001 From: Thanos Doukoudakis Date: Wed, 22 Mar 2017 12:44:15 +0000 Subject: Make the default chat view font to render thicker on Windows Added a font-weight property on the body style to enhance the default font weight (400) only on Windows, in order to improve the look of the chat view. If the font-weight is being defined in any other styles rules with higher priority, this default value will be overwritten. Test-Information: Tested with with windows 10 (qt5.4.2), Windows 10 (qt5.7), Ubuntu 16.04.2 (qt5.5) Change-Id: Iafd969cff487a907d136b9d2d8b393a90681216f diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index 290bd59..16d31e3 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.cpp @@ -354,6 +354,14 @@ void QtWebKitChatView::resetView() { webView_->setZoomFactor(QApplication::desktop()->screen()->logicalDpiX() / 96.0); body.setStyleProperty("font-size", QString("%1pt").arg(QApplication::font().pointSize())); + +#ifdef Q_OS_WIN + // Fix for Swift-162 + // Changing the font weight for windows in order for the fonts to display better. + // In the future, when we enable dpiawareness on windows, this can be reverted. + body.setStyleProperty("font-weight", QString("500")); +#endif // Q_OS_WIN + } static QWebElement findElementWithID(QWebElement document, QString elementName, QString id) { -- cgit v0.10.2-6-g49f6