update locations when dock changes location

--updates the available locations in the configuration
window when any dock updates its location
pull/1/head
Michail Vourlakos 8 years ago
parent 2c0e536cf9
commit fd40ef7f4d

@ -282,6 +282,7 @@ void DockCorona::addDock(Plasma::Containment *containment)
dockView->setContainment(containment);
connect(containment, &QObject::destroyed, this, &DockCorona::dockContainmentDestroyed);
connect(containment, &Plasma::Applet::destroyedChanged, this, &DockCorona::destroyedChanged);
connect(containment, &Plasma::Applet::locationChanged, this, &DockCorona::dockLocationChanged);
dockView->show();
m_dockViews[containment] = dockView;
emit docksCountChanged();

@ -65,6 +65,7 @@ public slots:
signals:
void configurationShown(PlasmaQuick::ConfigView *configView);
void docksCountChanged();
void dockLocationChanged();
private slots:
void destroyedChanged(bool destroyed);

@ -83,8 +83,10 @@ DockView::DockView(Plasma::Corona *corona, QScreen *targetScreen)
}, Qt::DirectConnection);
auto *dockCorona = qobject_cast<DockCorona *>(this->corona());
if (dockCorona)
if (dockCorona) {
connect(dockCorona, &DockCorona::docksCountChanged, this, &DockView::docksCountChanged);
connect(dockCorona, &DockCorona::dockLocationChanged, this, &DockView::dockLocationChanged);
}
}
DockView::~DockView()

@ -117,6 +117,7 @@ signals:
void removeInternalViewSplitter();
void eventTriggered(QEvent *ev);
void dockLocationChanged();
void docksCountChanged();
void widthChanged();
void heightChanged();

@ -58,10 +58,10 @@ PlasmaComponents.Page {
Layout.rightMargin: units.smallSpacing * 2
spacing: 1
property int docksCount: dock.docksCount
onDocksCountChanged: {
lockReservedEdges()
Connections{
target: dock
onDockLocationChanged: locationLayout.lockReservedEdges();
onDocksCountChanged: locationLayout.lockReservedEdges();
}
ExclusiveGroup {

Loading…
Cancel
Save