Plasma::Theme does no longer provide a global static theme
Need to hold a pointer instead.
This commit is contained in:
parent
6a91650fa8
commit
11dd05425e
2 changed files with 10 additions and 3 deletions
|
@ -1846,11 +1846,12 @@ EffectFrameImpl::EffectFrameImpl(EffectFrameStyle style, bool staticSize, QPoint
|
|||
, m_point(position)
|
||||
, m_alignment(alignment)
|
||||
, m_shader(NULL)
|
||||
, m_theme(new Plasma::Theme(this))
|
||||
{
|
||||
if (m_style == EffectFrameStyled) {
|
||||
m_frame.setImagePath("widgets/background");
|
||||
m_frame.setCacheAllRenderedFrames(true);
|
||||
connect(Plasma::Theme::defaultTheme(), SIGNAL(themeChanged()), this, SLOT(plasmaThemeChanged()));
|
||||
connect(m_theme, SIGNAL(themeChanged()), this, SLOT(plasmaThemeChanged()));
|
||||
}
|
||||
m_selection.setImagePath("widgets/viewitem");
|
||||
m_selection.setElementPrefix("hover");
|
||||
|
@ -2077,7 +2078,7 @@ void EffectFrameImpl::autoResize()
|
|||
|
||||
QColor EffectFrameImpl::styledTextColor()
|
||||
{
|
||||
return Plasma::Theme::defaultTheme()->color(Plasma::Theme::TextColor);
|
||||
return m_theme->color(Plasma::Theme::TextColor);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -31,6 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <QHash>
|
||||
#include <Plasma/FrameSvg>
|
||||
|
||||
namespace Plasma {
|
||||
class Theme;
|
||||
}
|
||||
|
||||
class QDBusPendingCallWatcher;
|
||||
class QDBusServiceWatcher;
|
||||
class KService;
|
||||
|
@ -391,7 +395,7 @@ public:
|
|||
/**
|
||||
* The foreground text color as specified by the default Plasma theme.
|
||||
*/
|
||||
static QColor styledTextColor();
|
||||
QColor styledTextColor();
|
||||
|
||||
private Q_SLOTS:
|
||||
void plasmaThemeChanged();
|
||||
|
@ -420,6 +424,8 @@ private:
|
|||
|
||||
Scene::EffectFrame* m_sceneFrame;
|
||||
GLShader* m_shader;
|
||||
|
||||
Plasma::Theme *m_theme;
|
||||
};
|
||||
|
||||
class ScreenLockerWatcher : public QObject
|
||||
|
|
Loading…
Reference in a new issue