add missing smallest font support for qml and js widgets

This commit is contained in:
Aaron Seigo 2011-08-17 18:07:12 +02:00
parent 6df8dc58dc
commit db97a9b6cb
2 changed files with 10 additions and 5 deletions

View File

@ -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;

View File

@ -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 */
}; };
/** /**