add missing smallest font support for qml and js widgets

(cherry picked from commit 7a15d198c629fe1b642e727253e369bfdceb725c)
(to fix compilation of kde-runtime with kdelibs master)
This commit is contained in:
Aaron Seigo 2011-08-17 18:07:12 +02:00 committed by David Faure
parent 0ab9bf2524
commit df4813ba2c
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
{
switch (role) {
case DesktopFont:
{
case DesktopFont: {
KConfigGroup cg(KGlobal::config(), "General");
return cg.readEntry("desktopFont", d->generalFont);
}
break;
}
break;
case DefaultFont:
default:
return d->generalFont;
break;
case SmallestFont:
return KGlobalSettings::smallestReadableFont();
break;
}
return d->generalFont;

View File

@ -78,7 +78,8 @@ class PLASMA_EXPORT Theme : public QObject
enum FontRole {
DefaultFont = 0, /**< The standard text font */
DesktopFont /**< The standard text font */
DesktopFont, /**< The standard text font */
SmallestFont /**< The smallest readable font */
};
/**