Dock shouldnt hide on userConfiguring state #32

v0.6
audoban 8 years ago
parent a9c1758f66
commit 448f0b83fd

@ -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<NowDockCorona *>(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<NowDockCorona *>(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()) {

@ -62,7 +62,6 @@ protected:
private slots:
void immutabilityChanged(Plasma::Types::ImmutabilityType type);
void configurationShown(PlasmaQuick::ConfigView *configView);
private:
bool m_blockFocusLost;

@ -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();
}

@ -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();
}

@ -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) ) {

Loading…
Cancel
Save