diff --git a/plugins/datetime/datetimeplugin.cpp b/plugins/datetime/datetimeplugin.cpp index 5bd589b6f..f179f3826 100644 --- a/plugins/datetime/datetimeplugin.cpp +++ b/plugins/datetime/datetimeplugin.cpp @@ -83,8 +83,14 @@ int DatetimePlugin::itemSortKey(const QString &itemKey) { Q_UNUSED(itemKey); - const QString key = QString("pos_%1").arg(displayMode()); - return m_settings.value(key, 0).toInt(); + Dock::DisplayMode mode = displayMode(); + const QString key = QString("pos_%1").arg(mode); + + if (mode == Dock::DisplayMode::Fashion) { + return m_settings.value(key, 5).toInt(); + } else { + return m_settings.value(key, -1).toInt(); + } } void DatetimePlugin::setSortKey(const QString &itemKey, const int order) diff --git a/plugins/network/networkplugin.cpp b/plugins/network/networkplugin.cpp index c53d9e1f1..1c361b217 100644 --- a/plugins/network/networkplugin.cpp +++ b/plugins/network/networkplugin.cpp @@ -150,8 +150,14 @@ QWidget *NetworkPlugin::itemPopupApplet(const QString &itemKey) int NetworkPlugin::itemSortKey(const QString &itemKey) { - const QString key = QString("pos_%1_%2").arg(itemKey).arg(displayMode()); - return m_settings.value(key, 0).toInt(); + Dock::DisplayMode mode = displayMode(); + const QString key = QString("pos_%1_%2").arg(itemKey).arg(mode); + + if (mode == Dock::DisplayMode::Fashion) { + return m_settings.value(key, 2).toInt(); + } else { + return m_settings.value(key, 3).toInt(); + } } void NetworkPlugin::setSortKey(const QString &itemKey, const int order) diff --git a/plugins/shutdown/shutdownplugin.cpp b/plugins/shutdown/shutdownplugin.cpp index ea0b8fd4f..2080528eb 100644 --- a/plugins/shutdown/shutdownplugin.cpp +++ b/plugins/shutdown/shutdownplugin.cpp @@ -225,8 +225,16 @@ void ShutdownPlugin::displayModeChanged(const Dock::DisplayMode displayMode) int ShutdownPlugin::itemSortKey(const QString &itemKey) { - const QString key = QString("pos_%1_%2").arg(itemKey).arg(displayMode()); - return m_settings.value(key, 0).toInt(); + Dock::DisplayMode mode = displayMode(); + const QString key = QString("pos_%1_%2").arg(itemKey).arg(mode); + + //if (mode == Dock::DisplayMode::Fashion) { + //return m_settings.value(key, 4).toInt(); + //} else { + //return m_settings.value(key, 4).toInt(); + //} + + return m_settings.value(key, 4).toInt(); } void ShutdownPlugin::setSortKey(const QString &itemKey, const int order) diff --git a/plugins/sound/soundplugin.cpp b/plugins/sound/soundplugin.cpp index 2b8eee617..27cfda9ef 100644 --- a/plugins/sound/soundplugin.cpp +++ b/plugins/sound/soundplugin.cpp @@ -106,8 +106,14 @@ int SoundPlugin::itemSortKey(const QString &itemKey) { Q_UNUSED(itemKey); - const QString key = QString("pos_%1").arg(displayMode()); - return m_settings.value(key, 0).toInt(); + Dock::DisplayMode mode = displayMode(); + const QString key = QString("pos_%1").arg(mode); + + if (mode == Dock::DisplayMode::Fashion) { + return m_settings.value(key, 1).toInt(); + } else { + return m_settings.value(key, 2).toInt(); + } } void SoundPlugin::setSortKey(const QString &itemKey, const int order) diff --git a/plugins/system-tray/systemtrayplugin.cpp b/plugins/system-tray/systemtrayplugin.cpp index d413ac7ed..4e3483b2a 100644 --- a/plugins/system-tray/systemtrayplugin.cpp +++ b/plugins/system-tray/systemtrayplugin.cpp @@ -137,8 +137,14 @@ bool SystemTrayPlugin::itemIsInContainer(const QString &itemKey) int SystemTrayPlugin::itemSortKey(const QString &itemKey) { - const QString key = QString("pos_%1_%2").arg(itemKey).arg(displayMode()); - return m_containerSettings->value(key, 0).toInt(); + Dock::DisplayMode mode = displayMode(); + const QString key = QString("pos_%1_%2").arg(itemKey).arg(mode); + + if (mode == Dock::DisplayMode::Fashion) { + return m_containerSettings->value(key, 3).toInt(); + } else { + return m_containerSettings->value(key, 1).toInt(); + } } void SystemTrayPlugin::setSortKey(const QString &itemKey, const int order)