[tabbox] Get DesktopSwitcher from look and feel package

Like with WindowSwitcher the configured value might be for the
look and feel package and thus we should first try to locate it
from the look and feel package.
icc-effect-5.14.5
Martin Gräßlin 2014-10-29 09:52:06 +01:00
parent d9dc53e0ed
commit e79f0d54f2
2 changed files with 9 additions and 5 deletions

View File

@ -761,8 +761,9 @@ void TabBox::reconfigure()
m_delayShow = config.readEntry<bool>("ShowDelay", true);
m_delayShowTime = config.readEntry<int>("DelayTime", 90);
m_desktopConfig.setLayoutName(config.readEntry("DesktopLayout", "informative"));
m_desktopListConfig.setLayoutName(config.readEntry("DesktopListLayout", "informative"));
const QString defaultDesktopLayout = QStringLiteral("org.kde.breeze.desktop");
m_desktopConfig.setLayoutName(config.readEntry("DesktopLayout", defaultDesktopLayout));
m_desktopListConfig.setLayoutName(config.readEntry("DesktopListLayout", defaultDesktopLayout));
#ifdef KWIN_BUILD_SCREENEDGES
QList<ElectricBorder> *borders = &m_borderActivate;

View File

@ -232,10 +232,13 @@ void TabBoxHandlerPrivate::endHighlightWindows(bool abort)
QObject *TabBoxHandlerPrivate::createSwitcherItem(bool desktopMode)
{
QString file;
if (!desktopMode) {
// first try look'n'feel package
// first try look'n'feel package
if (desktopMode) {
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QStringLiteral("plasma/look-and-feel/%1/contents/windowswitcher/WindowSwitcher.qml").arg(config.layoutName()));
QStringLiteral("plasma/look-and-feel/%1/contents/desktopswitcher/DesktopSwitcher.qml").arg(config.layoutName()));
} else {
file = QStandardPaths::locate(QStandardPaths::GenericDataLocation,
QStringLiteral("plasma/look-and-feel/%1/contents/windowswitcher/WindowSwitcher.qml").arg(config.layoutName()));
}
if (file.isNull()) {
auto findSwitcher = [this, desktopMode] {