diff --git a/tabbox/declarative.cpp b/tabbox/declarative.cpp index a6b12502cd..18e0a21d5a 100644 --- a/tabbox/declarative.cpp +++ b/tabbox/declarative.cpp @@ -112,21 +112,6 @@ QPixmap ImageProvider::requestPixmap(const QString &id, QSize *size, const QSize return icon; } -// WARNING: this code exists to cover a bug in Qt which prevents plasma from detecting the state change -// of the compositor through KWindowSystem. -// once plasma uses (again) a KSelectionWatcher or Qt is fixed in this regard, the code can go. -static QString plasmaThemeVariant() -{ -#ifndef TABBOX_KCM - if (!Workspace::self()->compositing() || !effects) { - return Plasma::Theme::defaultTheme()->currentThemeHasImage("opaque/dialogs/background") ? QLatin1String("opaque/") : QLatin1String(""); - } - if (static_cast(effects)->provides(Effect::Blur)) { - return Plasma::Theme::defaultTheme()->currentThemeHasImage("translucent/dialogs/background") ? QLatin1String("translucent/") : QLatin1String(""); - } -#endif - return QLatin1String(""); -} DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBoxMode mode, QWidget *parent) : QDeclarativeView(parent) @@ -158,7 +143,6 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox #endif qmlRegisterType("org.kde.kwin", 0, 1, "ThumbnailItem"); rootContext()->setContextProperty("viewId", static_cast(winId())); - rootContext()->setContextProperty("plasmaThemeVariant", plasmaThemeVariant()); if (m_mode == TabBoxConfig::ClientTabBox) { rootContext()->setContextProperty("clientModel", model); } else if (m_mode == TabBoxConfig::DesktopTabBox) { @@ -201,7 +185,6 @@ void DeclarativeView::showEvent(QShowEvent *event) item->setProperty("currentIndex", tabBox->first().row()); connect(item, SIGNAL(currentIndexChanged(int)), SLOT(currentIndexChanged(int))); } - rootContext()->setContextProperty("plasmaThemeVariant", plasmaThemeVariant()); slotUpdateGeometry(); QResizeEvent re(size(), size()); // to set mask and blurring. resizeEvent(&re); diff --git a/tabbox/qml/ShadowedSvgItem.qml b/tabbox/qml/ShadowedSvgItem.qml index ad92cabf17..76d59221e6 100644 --- a/tabbox/qml/ShadowedSvgItem.qml +++ b/tabbox/qml/ShadowedSvgItem.qml @@ -34,16 +34,15 @@ Item { PlasmaCore.FrameSvg { id: themeInfo - imagePath: plasmaThemeVariant + "dialogs/background" - // NOTICE: the following plasmaThemeVariant access causes necessary re-evaluation! - property bool hasNewShadows: plasmaThemeVariant != "reEvaluateMe" && hasElementPrefix("shadow") + imagePath: "dialogs/background" + property bool hasNewShadows: hasElementPrefix("shadow") } PlasmaCore.FrameSvgItem { id: shadow prefix: themeInfo.hasNewShadows ? "shadow" : "" - imagePath: plasmaThemeVariant + "dialogs/background" + imagePath: "dialogs/background" anchors.fill: parent visible: true