summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-08-23 11:58:12 (GMT)
committerKevin Smith <kevin.smith@isode.com>2016-08-23 12:12:01 (GMT)
commit14b211a927e8b2012eda4f187f8dcd9d119ef621 (patch)
treeb4af47adc95b71cd9470007cd4ff372848d91f87 /Swift/QtUI
parentaebb38a8f1e223934ff3093fc87a557156f10366 (diff)
downloadswift-14b211a927e8b2012eda4f187f8dcd9d119ef621.zip
swift-14b211a927e8b2012eda4f187f8dcd9d119ef621.tar.bz2
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
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp2
-rw-r--r--Swift/QtUI/Roster/QtTreeWidget.cpp5
2 files changed, 5 insertions, 2 deletions
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 <boost/bind.hpp>
+#include <QFont>
#include <QLabel>
#include <QMimeData>
#include <QObject>
@@ -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() {