diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 10:47:50 -0600 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2017-08-23 10:47:50 -0600 |
commit | 606ac173cd71ae2858b7455276d150735fbbe4c7 (patch) | |
tree | abc18726c47f0bed03aa89d1581cea21ecd7b927 | |
parent | dc1b6581e97f4fe9f33c5e0f1fa62172efba0a16 (diff) | |
download | kube-606ac173cd71ae2858b7455276d150735fbbe4c7.tar.gz kube-606ac173cd71ae2858b7455276d150735fbbe4c7.zip |
Don't hardcode the font
-rw-r--r-- | framework/src/domain/mime/partmodel.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/framework/src/domain/mime/partmodel.cpp b/framework/src/domain/mime/partmodel.cpp index df63f5e9..de6c89c3 100644 --- a/framework/src/domain/mime/partmodel.cpp +++ b/framework/src/domain/mime/partmodel.cpp | |||
@@ -116,15 +116,19 @@ QModelIndex PartModel::index(int row, int column, const QModelIndex &parent) con | |||
116 | 116 | ||
117 | static QString addCss(const QString &s) | 117 | static QString addCss(const QString &s) |
118 | { | 118 | { |
119 | //Get the default font from QApplication | ||
120 | static const auto fontFamily = QFont{}.family(); | ||
119 | //overflow:hidden ensures no scrollbars are ever shown. | 121 | //overflow:hidden ensures no scrollbars are ever shown. |
120 | const auto css = "<style>\n" | 122 | static const auto css = QString("<style>\n" |
121 | "body {\n" | 123 | "body {\n" |
122 | " overflow:hidden;\n" | 124 | " overflow:hidden;\n" |
123 | " font-family: \"Noto Sans\" ! important;\n" | 125 | " font-family: \"%1\" ! important;\n" |
124 | " color: #31363b ! important;\n" | 126 | " color: #31363b ! important;\n" |
125 | " background-color: #fcfcfc ! important\n" | 127 | " background-color: #fcfcfc ! important\n" |
126 | "}\n" | 128 | "}\n" |
127 | "</style>"; | 129 | "</style>") |
130 | .arg(fontFamily); | ||
131 | |||
128 | const auto header = QLatin1String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" | 132 | const auto header = QLatin1String("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n" |
129 | "<html><head><title></title>") | 133 | "<html><head><title></title>") |
130 | + css + QLatin1String("</head>\n<body>\n"); | 134 | + css + QLatin1String("</head>\n<body>\n"); |