diff --git a/applethandle.cpp b/applethandle.cpp index 3fce44398..07ecac3d0 100644 --- a/applethandle.cpp +++ b/applethandle.cpp @@ -59,8 +59,8 @@ AppletHandle::AppletHandle(Containment *parent, Applet *applet) m_buttonsOnRight(false), m_pendingFade(false) { - KColorScheme colors(QPalette::Active, KColorScheme::View, Theme::self()->colors()); - m_gradientColor = colors.background(KColorScheme::NormalBackground).color(); + KColorScheme colorScheme(QPalette::Active, KColorScheme::View, Theme::self()->colorScheme()); + m_gradientColor = colorScheme.background(KColorScheme::NormalBackground).color(); QTransform originalMatrix = m_applet->transform(); QRectF rect(m_applet->contentsRect()); diff --git a/desktoptoolbox.cpp b/desktoptoolbox.cpp index 39f012bd2..c50b4c2fa 100644 --- a/desktoptoolbox.cpp +++ b/desktoptoolbox.cpp @@ -109,11 +109,11 @@ void DesktopToolbox::paint(QPainter *painter, const QStyleOptionGraphicsItem *op painter->translate(boundingRect().topLeft()); QColor color1 = KColorScheme(QPalette::Active, KColorScheme::Window, - Plasma::Theme::self()->colors()).background().color(); + Plasma::Theme::self()->colorScheme()).background().color(); color1.setAlpha(64); QColor color2 = KColorScheme(QPalette::Active, KColorScheme::Window, - Plasma::Theme::self()->colors()).foreground().color(); + Plasma::Theme::self()->colorScheme()).foreground().color(); color2.setAlpha(64); QPainterPath p = shape(); diff --git a/paneltoolbox.cpp b/paneltoolbox.cpp index 32d1f37cd..bb04f8ad1 100644 --- a/paneltoolbox.cpp +++ b/paneltoolbox.cpp @@ -119,11 +119,11 @@ void PanelToolbox::paint(QPainter *painter, const QStyleOptionGraphicsItem *opti painter->translate(boundingRect().topLeft()); QColor color1 = KColorScheme(QPalette::Active, KColorScheme::Window, - Plasma::Theme::self()->colors()).background().color(); + Plasma::Theme::self()->colorScheme()).background().color(); color1.setAlpha(64); QColor color2 = KColorScheme(QPalette::Active, KColorScheme::Window, - Plasma::Theme::self()->colors()).foreground().color(); + Plasma::Theme::self()->colorScheme()).foreground().color(); color2.setAlpha(64); QPainterPath p = shape(); diff --git a/svg.cpp b/svg.cpp index 6d6c4c2f9..8d7be48dd 100644 --- a/svg.cpp +++ b/svg.cpp @@ -98,7 +98,7 @@ class Svg::Private // check if svg wants colorscheme applied createRenderer(); applyColors = renderer->elementExists("hint-apply-color-scheme"); - if (applyColors && !Theme::self()->colors()) { + if (applyColors && !Theme::self()->colorScheme()) { connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), q, SLOT(colorsChanged())); } @@ -234,7 +234,7 @@ class Svg::Private } if (themed && path.isEmpty()) { - path = Plasma::Theme::self()->image(themePath); + path = Plasma::Theme::self()->imagePath(themePath); } QHash::const_iterator it = renderers.find(path); @@ -296,9 +296,9 @@ class Svg::Private QString path; QList ids; QSizeF size; + Svg::ContentType contentType; bool themed; bool applyColors; - Svg::ContentType contentType; }; QHash Svg::Private::renderers; @@ -438,7 +438,7 @@ void Svg::themeChanged() return; } - QString newPath = Theme::self()->image(d->themePath); + QString newPath = Theme::self()->imagePath(d->themePath); if (d->path == newPath) { return; diff --git a/theme.cpp b/theme.cpp index b742de8c0..c8bf68ffe 100644 --- a/theme.cpp +++ b/theme.cpp @@ -231,7 +231,7 @@ QString Theme::Private::findInTheme(const QString &image, const QString &theme) return search; } -QString Theme::image(const QString& name) const +QString Theme::imagePath(const QString& name) const { QString path = d->findInTheme(name, d->themeName); @@ -246,21 +246,21 @@ QString Theme::image(const QString& name) const return path; } -KSharedConfigPtr Theme::colors() const +KSharedConfigPtr Theme::colorScheme() const { return d->colors; } QColor Theme::textColor() const { - KColorScheme colors(QPalette::Active, KColorScheme::Window, Theme::self()->colors()); - return colors.foreground(KColorScheme::NormalText).color(); + KColorScheme colorScheme(QPalette::Active, KColorScheme::Window, Theme::self()->colorScheme()); + return colorScheme.foreground(KColorScheme::NormalText).color(); } QColor Theme::backgroundColor() const { - KColorScheme colors(QPalette::Active, KColorScheme::Window, Theme::self()->colors()); - return colors.background().color(); + KColorScheme colorScheme(QPalette::Active, KColorScheme::Window, Theme::self()->colorScheme()); + return colorScheme.background().color(); } void Theme::setFont(const QFont &font) diff --git a/theme.h b/theme.h index 6e5ceebbd..4e2adaf17 100644 --- a/theme.h +++ b/theme.h @@ -36,7 +36,7 @@ namespace Plasma * * Accessed via Plasma::Theme::self() e.g: * \code - * QString image = Plasma::Theme::self()->image("widgets/clock") + * QString imagePath = Plasma::Theme::self()->imagePath("widgets/clock") * \endcode * * Plasma::Theme provides access to a common and standardized set of graphic @@ -95,14 +95,14 @@ class PLASMA_EXPORT Theme : public QObject * ".svg" part or a leading slash) * @return the full path to the requested file for the current theme */ - Q_INVOKABLE QString image( const QString& name ) const; + Q_INVOKABLE QString imagePath( const QString& name ) const; /** * Returns the color scheme configurationthat goes along this theme. * This can be used with KStatefulBrush and KColorScheme to determine * the proper colours to use along with the visual elements in this theme. */ - Q_INVOKABLE KSharedConfigPtr colors() const; + Q_INVOKABLE KSharedConfigPtr colorScheme() const; /** * Returns the text color to be used by items resting on the background