diff --git a/app/dockconfigview.cpp b/app/dockconfigview.cpp index 0af12ec0e..1ac2dc509 100644 --- a/app/dockconfigview.cpp +++ b/app/dockconfigview.cpp @@ -59,19 +59,6 @@ DockConfigView::DockConfigView(Plasma::Containment *containment, DockView *dockV }); connect(containment, &Plasma::Containment::immutabilityChanged, this, &DockConfigView::immutabilityChanged); - - - //! NOTE: This is not necesesary if focusOutEvent is implemented - /*NowDockCorona *corona = qobject_cast(m_containment->corona()); - if (corona) { - connect(corona, &NowDockCorona::configurationShown, this, &DockConfigView::configurationShown); - }*/ - - /* connect(containment, &Plasma::Containment::immutabilityChanged - , [&](Plasma::Types::ImmutabilityType type) { - if (type != Plasma::Types::Mutable && this && isVisible()) - hide(); - });*/ } DockConfigView::~DockConfigView() @@ -103,6 +90,8 @@ void DockConfigView::syncGeometry() const auto location = m_containment->location(); const auto sGeometry = screen()->geometry(); + qDebug() << "sync geometry"; + switch (m_containment->formFactor()) { case Plasma::Types::Horizontal: { const QSize size(rootObject()->width(), rootObject()->height()); @@ -111,11 +100,11 @@ void DockConfigView::syncGeometry() resize(size); if (location == Plasma::Types::TopEdge) { - setPosition(sGeometry.center().x() - size.width() / 2 + setPosition(sGeometry.center().x() - size.width() / 2 - 1 , m_dockView->currentThickness()); } else if (location == Plasma::Types::BottomEdge) { - setPosition(sGeometry.center().x() - size.width() / 2 - , sGeometry.height() - m_dockView->currentThickness() - size.height()); + setPosition(sGeometry.center().x() - size.width() / 2 - 1 + , sGeometry.height() - m_dockView->currentThickness() - size.height() - 1); } } break; @@ -130,8 +119,8 @@ void DockConfigView::syncGeometry() setPosition(m_dockView->currentThickness() , sGeometry.center().y() - size.height() / 2); } else if (location == Plasma::Types::RightEdge) { - setPosition(sGeometry.width() - m_dockView->currentThickness() - size.width() - , sGeometry.center().y() - size.height() / 2); + setPosition(sGeometry.width() - m_dockView->currentThickness() - size.width() - 1 + , sGeometry.center().y() - size.height() / 2 - 1); } } break; @@ -193,15 +182,6 @@ void DockConfigView::showEvent(QShowEvent *ev) m_deleterTimer.stop(); ConfigView::showEvent(ev); - - //trigger showing configuration window through corona - //in order to hide all alternative configuration windows - //! NOTE: This is not necesesary if focusOutEvent is implemented -// NowDockCorona *corona = qobject_cast(m_containment->corona()); - -// if (corona) { -// emit corona->configurationShown(this); -// } } void DockConfigView::hideEvent(QHideEvent *ev) @@ -229,13 +209,6 @@ void DockConfigView::focusOutEvent(QFocusEvent *ev) } } -void DockConfigView::configurationShown(PlasmaQuick::ConfigView *configView) -{ - if ((configView != this) && isVisible()) { - hide(); - } -} - void DockConfigView::immutabilityChanged(Plasma::Types::ImmutabilityType type) { if (type != Plasma::Types::Mutable && isVisible()) { diff --git a/app/dockconfigview.h b/app/dockconfigview.h index 3e9e13adc..affec6239 100644 --- a/app/dockconfigview.h +++ b/app/dockconfigview.h @@ -62,7 +62,6 @@ protected: private slots: void immutabilityChanged(Plasma::Types::ImmutabilityType type); - void configurationShown(PlasmaQuick::ConfigView *configView); private: bool m_blockFocusLost; diff --git a/app/visibilitymanager.cpp b/app/visibilitymanager.cpp index a142d6367..3c4782885 100644 --- a/app/visibilitymanager.cpp +++ b/app/visibilitymanager.cpp @@ -178,11 +178,17 @@ void VisibilityManagerPrivate::setBlockHiding(bool blockHiding) this->blockHiding = blockHiding; + qDebug() << "blockHiding:" << blockHiding; + if (this->blockHiding) { timerHide.stop(); - if (isHidden) + if (isHidden) { isHidden = false; + + emit q->isHiddenChanged(); + emit q->mustBeShown(); + } } else { updateHiddenState(); } diff --git a/containment/contents/ui/VisibilityManager.qml b/containment/contents/ui/VisibilityManager.qml index db7a7cb69..7c257ed9e 100644 --- a/containment/contents/ui/VisibilityManager.qml +++ b/containment/contents/ui/VisibilityManager.qml @@ -102,15 +102,7 @@ Item{ function slotMustBeHide() { // console.log("hide...."); - //if (!plasmoid.userConfiguring) { slidingAnimationAutoHiddenOut.init(); - //} - } - - function slotModeChanged() { - if (dock.visibility.mode !== Latte.Dock.AutoHide) { - dock.visibility.isHidden = false; - } } ///test maskArea @@ -307,7 +299,8 @@ Item{ } function init() { - start(); + if (!dock.visibility.blockHiding) + start(); } } @@ -326,7 +319,8 @@ Item{ } function init() { - dock.visibility.isHidden = false; + if (!dock.visibility.blockHiding) + dock.visibility.isHidden = false; updateMaskArea(); start(); } diff --git a/containment/contents/ui/main.qml b/containment/contents/ui/main.qml index ff7df2d2a..513eb9ca6 100644 --- a/containment/contents/ui/main.qml +++ b/containment/contents/ui/main.qml @@ -424,7 +424,6 @@ DragDrop.DropArea { dock.visibility.onContainsMouseChanged.connect(visibilityManager.slotContainsMouseChanged); dock.visibility.onMustBeHide.connect(visibilityManager.slotMustBeHide); dock.visibility.onMustBeShown.connect(visibilityManager.slotMustBeShown); - dock.visibility.onModeChanged.connect(visibilityManager.slotModeChanged); } } @@ -479,7 +478,6 @@ DragDrop.DropArea { nowDock.signalAnimationsNeedBothAxis.connect(slotAnimationsNeedBothAxis); nowDock.signalAnimationsNeedLength.connect(slotAnimationsNeedLength); nowDock.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness); - nowDock.signalDraggingState.connect(slotDisableHiding); } } @@ -557,11 +555,10 @@ DragDrop.DropArea { } return; } + + console.debug("user configuring", plasmoid.userConfiguring) if (plasmoid.userConfiguring) { - if (dock.visibility.isHidden) { - dock.visibility.mustBeShown(); - } dock.visibility.blockHiding = true; // console.log("applets------"); @@ -882,10 +879,6 @@ DragDrop.DropArea { visibilityManager.updateMaskArea(); } - function slotDisableHiding(value) { - dock.visibility.blockHiding = value; - } - function updateAutomaticIconSize() { if (visibilityManager.normalState && !animatedLengthTimer.running && !root.editMode && (iconSize===plasmoid.configuration.iconSize || iconSize === automaticIconSizeBasedSize) ) {