diff options
author | Thanos Doukoudakis <thanos.doukoudakis@isode.com> | 2017-03-22 12:44:15 (GMT) |
---|---|---|
committer | Kevin Smith <kevin.smith@isode.com> | 2017-04-10 11:07:34 (GMT) |
commit | de89a73ff9c7575323cb61e358e8e3c8274214e4 (patch) | |
tree | ec2db27b99055823733258a09e1af9db5264c61d | |
parent | ebd98c32281e2c2689480357f7e8ce6084e16384 (diff) | |
download | swift-de89a73ff9c7575323cb61e358e8e3c8274214e4.zip swift-de89a73ff9c7575323cb61e358e8e3c8274214e4.tar.bz2 |
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
-rw-r--r-- | Swift/QtUI/QtWebKitChatView.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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) { |