fix #411,deactivate applets when show previews

pull/1/head
Michail Vourlakos 8 years ago
parent df0da77083
commit 2ef64f4ab3

@ -143,8 +143,6 @@ public:
VisibilityManager *visibility() const;
void deactivateApplets();
QQmlListProperty<QScreen> screens();
static int countScreens(QQmlListProperty<QScreen> *property);
static QScreen *atScreens(QQmlListProperty<QScreen> *property, int index);
@ -157,6 +155,7 @@ public slots:
Q_INVOKABLE QList<int> freeEdges() const;
Q_INVOKABLE QVariantList containmentActions();
Q_INVOKABLE int docksWithTasks();
Q_INVOKABLE void deactivateApplets();
Q_INVOKABLE void removeTasksPlasmoid();
Q_INVOKABLE bool setCurrentScreen(const QString id);
Q_INVOKABLE bool tasksPresent();

@ -595,6 +595,7 @@ DragDrop.DropArea {
latteApplet.signalAnimationsNeedLength.connect(slotAnimationsNeedLength);
latteApplet.signalAnimationsNeedThickness.connect(slotAnimationsNeedThickness);
latteApplet.signalActionsBlockHiding.connect(slotActionsBlockHiding);
latteApplet.signalPreviewsShown.connect(slotPreviewsShown);
}
}
@ -1087,6 +1088,12 @@ DragDrop.DropArea {
}
}
function slotPreviewsShown(){
if (dock) {
dock.deactivateApplets();
}
}
function updateAutomaticIconSize() {
if ((visibilityManager.normalState && !root.editMode && root.autoDecreaseIconSize)
&& (iconSize===root.maxIconSize || iconSize === automaticIconSizeBasedSize) ) {

@ -171,6 +171,7 @@ Item {
signal signalAnimationsNeedBothAxis(int value);
signal signalAnimationsNeedLength(int value);
signal signalAnimationsNeedThickness(int value);
signal signalPreviewsShown();
//signal signalDraggingState(bool value);
signal showPreviewForTasks(QtObject group);
//trigger updating scaling of neighbour delegates of zoomed delegate
@ -402,6 +403,12 @@ Item {
if (!activeItem || (activeItem !== taskItem) && !taskItem.contextMenu) {
//console.log("preview show called: accepted...");
//this can be used from others to hide their appearance
//e.g but applets from the dock to hide themselves
if (!visible) {
root.signalPreviewsShown();
}
//used to initialize windows previews buffers from task to task
visible = false;
activeItem = taskItem;

Loading…
Cancel
Save