add missing smallest font support for qml and js widgets
This commit is contained in:
parent
6df8dc58dc
commit
db97a9b6cb
12
theme.cpp
12
theme.cpp
@ -859,16 +859,20 @@ void Theme::setFont(const QFont &font, FontRole role)
|
|||||||
QFont Theme::font(FontRole role) const
|
QFont Theme::font(FontRole role) const
|
||||||
{
|
{
|
||||||
switch (role) {
|
switch (role) {
|
||||||
case DesktopFont:
|
case DesktopFont: {
|
||||||
{
|
|
||||||
KConfigGroup cg(KGlobal::config(), "General");
|
KConfigGroup cg(KGlobal::config(), "General");
|
||||||
return cg.readEntry("desktopFont", d->generalFont);
|
return cg.readEntry("desktopFont", d->generalFont);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DefaultFont:
|
case DefaultFont:
|
||||||
default:
|
default:
|
||||||
return d->generalFont;
|
return d->generalFont;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SmallestFont:
|
||||||
|
return KGlobalSettings::smallestReadableFont();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
return d->generalFont;
|
return d->generalFont;
|
||||||
|
3
theme.h
3
theme.h
@ -78,7 +78,8 @@ class PLASMA_EXPORT Theme : public QObject
|
|||||||
|
|
||||||
enum FontRole {
|
enum FontRole {
|
||||||
DefaultFont = 0, /**< The standard text font */
|
DefaultFont = 0, /**< The standard text font */
|
||||||
DesktopFont /**< The standard text font */
|
DesktopFont, /**< The standard text font */
|
||||||
|
SmallestFont /**< The smallest readable font */
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user