Changeset View
Changeset View
Standalone View
Standalone View
kded/configvalueprovider.cpp
Show All 40 Lines | |||||
41 | { | 41 | { | ||
42 | static const QFont defaultFont(QStringLiteral("Noto Sans"), 10); | 42 | static const QFont defaultFont(QStringLiteral("Noto Sans"), 10); | ||
43 | 43 | | |||
44 | kdeglobalsConfig->reparseConfiguration(); | 44 | kdeglobalsConfig->reparseConfiguration(); | ||
45 | KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("General")); | 45 | KConfigGroup configGroup = kdeglobalsConfig->group(QStringLiteral("General")); | ||
46 | QString fontAsString = configGroup.readEntry(QStringLiteral("font"), defaultFont.toString()); | 46 | QString fontAsString = configGroup.readEntry(QStringLiteral("font"), defaultFont.toString()); | ||
47 | static QFont font; | 47 | static QFont font; | ||
48 | font.fromString(fontAsString); | 48 | font.fromString(fontAsString); | ||
49 | return font.family() + QStringLiteral(", ") + font.styleName() + ' ' + QString::number(font.pointSize()); | 49 | return font.family() + QStringLiteral(", ") + QString::number(font.pointSize()); | ||
50 | } | 50 | } | ||
chauvin: I think
```
QStringLiteral(", ")
```
should be replaced by a space (see my [[ https://bugs. | |||||
Comma is important, if not the comma, the GTK would not be able to parse font with spaces in name. Comma fixed that bug: https://bugs.kde.org/show_bug.cgi?id=380980 gikari: Comma is important, if not the comma, the GTK would not be able to parse font with spaces in… | |||||
I observed a different behavior with ~/.gtkrc-2.0 (libgtk version 2.62.1) chauvin: I observed a different behavior with ~/.gtkrc-2.0 (libgtk version 2.62.1)
There is perhaps a… | |||||
Sorry I missread the version of libgtk2.0 it is 2.24.32 (not 2.62.1) It works with the following line in ~/.gtkrc-2.0: gtk-font-name="Ubuntu, Light 11" gtk-font-name="Ubuntu Light Regular 11" but it doesn't work with: gtk-font-name="Ubuntu Light, Regular 11" So I assume it is a bug in gtk2 parser and the comma is not the problem I am not sure but I think the parsing is done in this function: chauvin: Sorry I missread the version of libgtk2.0 it is 2.24.32 (not 2.62.1)
It works with the… | |||||
51 | 51 | | |||
52 | QString ConfigValueProvider::iconThemeName() const | 52 | QString ConfigValueProvider::iconThemeName() const | ||
ervin: Space should be before & not after | |||||
53 | { | 53 | { | ||
54 | KIconTheme *newIconTheme = KIconLoader::global()->theme(); | 54 | KIconTheme *newIconTheme = KIconLoader::global()->theme(); | ||
55 | if (newIconTheme) { | 55 | if (newIconTheme) { | ||
56 | return newIconTheme->internalName(); | 56 | return newIconTheme->internalName(); | ||
57 | } else { | 57 | } else { | ||
58 | return QStringLiteral("breeze"); | 58 | return QStringLiteral("breeze"); | ||
59 | } | 59 | } | ||
60 | } | 60 | } | ||
▲ Show 20 Lines • Show All 152 Lines • Show Last 20 Lines |
I think
should be replaced by a space (see my comment)
however I don't know what will happen in ambigious cases such like:
"DejaVu Sans" + " " + "Condensed Bold" + " " +"11"
and
"DejaVu Sans Condensed" + " " + "Bold" + " " +"11"