From db97a9b6cbc1212acd15195bb4ec0834f9e6519c Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Wed, 17 Aug 2011 18:07:12 +0200 Subject: [PATCH] add missing smallest font support for qml and js widgets --- theme.cpp | 12 ++++++++---- theme.h | 3 ++- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/theme.cpp b/theme.cpp index cdb7fc625..3849df2a6 100644 --- a/theme.cpp +++ b/theme.cpp @@ -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; diff --git a/theme.h b/theme.h index b5118276b..7536f3dcf 100644 --- a/theme.h +++ b/theme.h @@ -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 */ }; /**