1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-27 14:50:21 +03:00

force visibility in startup if user is configuring

This commit is contained in:
audoban 2017-04-02 04:24:49 -05:00
parent b4ffe82ab3
commit a7728044de
2 changed files with 11 additions and 2 deletions

View File

@ -40,6 +40,8 @@ VisibilityManagerPrivate::VisibilityManagerPrivate(PlasmaQuick::ContainmentView
connect(dockView, &DockView::absGeometryChanged, this, &VisibilityManagerPrivate::setDockGeometry);
}
timerStartUp.setInterval(5000);
timerStartUp.setSingleShot(true);
timerCheckWindows.setInterval(350);
timerCheckWindows.setSingleShot(true);
timerShow.setSingleShot(true);
@ -459,12 +461,18 @@ inline void VisibilityManagerPrivate::restoreConfig()
if (mode() == Dock::AlwaysVisible) {
setMode(Dock::AlwaysVisible);
} else {
QTimer::singleShot(5000, this, [&, mode]() {
connect(&timerStartUp, &QTimer::timeout, this, [&, mode]() {
setMode(mode());
});
connect(view->containment(), &Plasma::Containment::userConfiguringChanged
,this, [&](bool configuring) {
if (configuring && timerStartUp.isActive())
timerStartUp.start(100);
});
timerStartUp.start();
}
qDebug() << config.entryMap();
connect(view->containment(), &Plasma::Containment::userConfiguringChanged
, this, [&](bool configuring) {
if (!configuring)

View File

@ -65,6 +65,7 @@ public:
QTimer timerShow;
QTimer timerHide;
QTimer timerCheckWindows;
QTimer timerStartUp;
QRect dockGeometry;
bool isHidden{false};
bool dragEnter{false};