diff --git a/shell/panelview.cpp b/shell/panelview.cpp --- a/shell/panelview.cpp +++ b/shell/panelview.cpp @@ -160,7 +160,8 @@ } m_alignment = alignment; - config().writeEntry("alignment", (int)m_alignment); + //alignment is not resolution dependent + config().parent().writeEntry("alignment", (int)m_alignment); emit alignmentChanged(); positionPanel(); } @@ -326,8 +327,9 @@ connect(containment(), &Plasma::Applet::activated, this, &PanelView::showTemporarily); } - if (config().isValid()) { - config().writeEntry("panelVisibility", (int)mode); + if (config().isValid() && config().parent().isValid()) { + //panelVisibility is not resolution dependent + config().parent().writeEntry("panelVisibility", (int)mode); m_corona->requestApplicationConfigSync(); } @@ -528,7 +530,13 @@ //defaults, may be altered by values written by the scripting in startup phase const int defaultOffset = 0; const int defaultAlignment = Qt::AlignLeft; - setAlignment((Qt::Alignment)config().readEntry("alignment", defaultAlignment)); + //alignment is not resolution dependent + int alignment = config().parent().readEntry("alignment", -1); + //legacy mode as the place for this config key is changed in Plasma 5.9 + if (alignment < 0) { + alignment = config().readEntry("alignment", defaultAlignment); + } + setAlignment((Qt::Alignment)alignment); m_offset = config().readEntry("offset", defaultOffset); if (m_alignment != Qt::AlignCenter) { m_offset = qMax(0, m_offset); @@ -547,7 +555,13 @@ m_maxLength = qBound(MINSIZE, config().readEntry("maxLength", side), maxSize); m_minLength = qBound(MINSIZE, config().readEntry("minLength", side), maxSize); - setVisibilityMode((VisibilityMode)config().readEntry("panelVisibility", (int)NormalPanel)); + //panelVisibility is not resolution dependent + int visibility = config().parent().readEntry("panelVisibility", -1); + //legacy mode as the place for this config key is changed in Plasma 5.9 + if (visibility < 0) { + visibility = config().readEntry("panelVisibility", (int)NormalPanel); + } + setVisibilityMode((VisibilityMode)visibility); m_initCompleted = true; resizePanel(); positionPanel();