1
0
mirror of https://github.com/KDE/latte-dock.git synced 2025-03-20 06:50:28 +03:00

disable properly automatic icon size

-- disable always and forcefully the automatic icon
size for plasma task managers and make sure to restore
to normal icon size when only such managers are present
This commit is contained in:
Michail Vourlakos 2017-07-29 15:06:50 +03:00
parent 6893ef9287
commit e4b03449a2

View File

@ -340,6 +340,8 @@ DragDrop.DropArea {
//// END OF Behaviors
//////////////START OF CONNECTIONS
onContainsOnlyPlasmaTasksChanged: updateAutomaticIconSize();
onEditModeChanged: {
if (editMode) {
visibilityManager.updateMaskArea();
@ -364,6 +366,8 @@ DragDrop.DropArea {
dock.visibility.onContainsMouseChanged.connect(visibilityManager.slotContainsMouseChanged);
dock.visibility.onMustBeHide.connect(visibilityManager.slotMustBeHide);
dock.visibility.onMustBeShown.connect(visibilityManager.slotMustBeShown);
updateContainsOnlyPlasmaTasks();
}
}
@ -532,7 +536,6 @@ DragDrop.DropArea {
addApplet(applet, x, y);
LayoutManager.save();
updateIndexes();
updateContainsOnlyPlasmaTasks();
}
Containment.onAppletRemoved: {
@ -648,6 +651,8 @@ DragDrop.DropArea {
})
addContainerInLayout(container, applet, x, y);
updateContainsOnlyPlasmaTasks();
}
function addContainerInLayout(container, applet, x, y){
@ -988,7 +993,8 @@ DragDrop.DropArea {
}
function updateAutomaticIconSize() {
if ((visibilityManager.normalState && !root.editMode && root.autoDecreaseIconSize)
if ((visibilityManager.normalState && !root.editMode
&& (root.autoDecreaseIconSize || (!root.autoDecreaseIconSize && root.iconSize!=root.maxIconSize)))
&& (iconSize===root.maxIconSize || iconSize === automaticIconSizeBasedSize) ) {
var layoutLength;
var maxLength = root.maxLength;
@ -1051,7 +1057,11 @@ DragDrop.DropArea {
}
function updateContainsOnlyPlasmaTasks() {
root.containsOnlyPlasmaTasks = (dock.tasksPresent() && !dock.latteTasksPresent());
if (dock) {
root.containsOnlyPlasmaTasks = (dock.tasksPresent() && !dock.latteTasksPresent());
} else {
root.containsOnlyPlasmaTasks = false;
}
}
function updateSizeForAppletsInFill() {