From 14b211a927e8b2012eda4f187f8dcd9d119ef621 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Tue, 23 Aug 2016 13:58:12 +0200 Subject: Only use Lato font for rosters and the chat view This sets the font family to Lato for QtTreeWidgets. The font size or other settings are not changed. Test-Information: Tested on OS X 10.11.6 with Qt 5.5.1. Change-Id: I235ae1b4e98e903872cb21ce41eca5f08955042d diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp index 6e36fa4..5d05a3d 100644 --- a/Swift/QtUI/QtSwift.cpp +++ b/Swift/QtUI/QtSwift.cpp @@ -200,8 +200,6 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa assert((error != -1) && "Failed to load font."); } - QApplication::setFont(QFont("Lato")); - bool enableAdHocCommandOnJID = options.count("enable-jid-adhocs") > 0; tabs_ = nullptr; if (options.count("no-tabs") && !splitter_) { diff --git a/Swift/QtUI/Roster/QtTreeWidget.cpp b/Swift/QtUI/Roster/QtTreeWidget.cpp index 249523c..f04575d 100644 --- a/Swift/QtUI/Roster/QtTreeWidget.cpp +++ b/Swift/QtUI/Roster/QtTreeWidget.cpp @@ -10,6 +10,7 @@ #include +#include #include #include #include @@ -59,6 +60,10 @@ QtTreeWidget::QtTreeWidget(UIEventStream* eventStream, SettingsProvider* setting connect(this, SIGNAL(clicked(const QModelIndex&)), this, SLOT(handleClicked(const QModelIndex&))); settings_->onSettingChanged.connect(boost::bind(&QtTreeWidget::handleSettingChanged, this, _1)); + + QFont lato = font(); + lato.setFamily("Lato"); + setFont(lato); } QtTreeWidget::~QtTreeWidget() { -- cgit v0.10.2-6-g49f6