summarylogtreecommitdiffstats
path: root/use_app_font.patch
blob: 315752d648867993ee7ca5f3381b061bc5f2bdb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From e70fec1663e4a8947fac518032cc7a1ebb6cd424 Mon Sep 17 00:00:00 2001
From: Gabriel Retana <gabrielretana@about.me>
Date: Sat, 19 May 2018 22:20:43 -0600
Subject: [PATCH] Use application font instead of create new one

---
 itemcontroller.cpp | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/itemcontroller.cpp b/itemcontroller.cpp
index 0b35a9d..068cec8 100644
--- a/itemcontroller.cpp
+++ b/itemcontroller.cpp
@@ -1,4 +1,5 @@
 #include <QDBusPendingCall>
+#include <QApplication>
 #include "iconproducer.h"
 #include "appletstrings.h"
 #include "itemcontroller.h"
@@ -44,7 +45,10 @@ void ServiceItemController::update()
     int strength = connmanObject->properties["Strength"].toInt();
 
     item->setData(state == "online" ? name + ' ' + QChar(0x2713) : name, Qt::DisplayRole);
-    item->setData(state == "ready" || state == "online" ? QFont("", -1, QFont::Bold) : QVariant(), Qt::FontRole);
+    //item->setData(state == "ready" || state == "online" ? QFont("", -1, QFont::Bold) : QVariant(), Qt::FontRole);
+    QFont font = qApp->font();
+    font.setBold(true);
+    item->setData(state == "ready" || state == "online" ? font : QVariant(), Qt::FontRole);
 
     if (type == "wifi") {
         item->setData(IconProducer::instance().wireless(strength), Qt::DecorationRole);