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

disable automatic icon size for plasma taskmanagers

This commit is contained in:
Michail Vourlakos 2017-07-28 18:47:54 +03:00
parent 9f359f37db
commit 7e07a402da
2 changed files with 11 additions and 2 deletions

View File

@ -55,7 +55,8 @@ DragDrop.DropArea {
property bool addLaunchersMessage: false
property bool addLaunchersInTaskManager: plasmoid.configuration.addLaunchersInTaskManager
property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize
// when there are only plasma style task managers the automatic icon size algorithm should better be disabled
property bool autoDecreaseIconSize: plasmoid.configuration.autoDecreaseIconSize && !containsOnlyPlasmaTasks
property bool backgroundOnlyOnMaximized: plasmoid.configuration.backgroundOnlyOnMaximized
property bool behaveAsPlasmaPanel: {
if (!dock || !dock.visibility)
@ -68,6 +69,7 @@ DragDrop.DropArea {
property bool blurEnabled: plasmoid.configuration.blurEnabled && !root.forceTransparentPanel
property bool confirmedDragEntered: false
property bool containsOnlyPlasmaTasks: false //this is flag to indicate when from tasks only a plasma based one is found
property bool dockContainsMouse: dock && dock.visibility ? dock.visibility.containsMouse : false
property bool disablePanelShadowMaximized: plasmoid.configuration.disablePanelShadowForMaximized
@ -530,6 +532,7 @@ DragDrop.DropArea {
addApplet(applet, x, y);
LayoutManager.save();
updateIndexes();
updateContainsOnlyPlasmaTasks();
}
Containment.onAppletRemoved: {
@ -551,6 +554,7 @@ DragDrop.DropArea {
LayoutManager.save();
updateIndexes();
updateContainsOnlyPlasmaTasks();
}
Plasmoid.onUserConfiguringChanged: {
@ -1046,6 +1050,10 @@ DragDrop.DropArea {
}
}
function updateContainsOnlyPlasmaTasks() {
root.containsOnlyPlasmaTasks = (dock.tasksPresent() && !dock.latteTasksPresent());
}
function updateSizeForAppletsInFill() {
layoutsContainer.updateSizeForAppletsInFill();
}

View File

@ -135,7 +135,8 @@ PlasmaComponents.Page {
Layout.leftMargin: units.smallSpacing * 2
text: i18n("Decrease applets size when it is needed")
checked: plasmoid.configuration.autoDecreaseIconSize
tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length")
tooltip: i18n("Applets size is decreased automatically when the contents \nexceed the maximum length <br><br><i>Hint: this option is disabled when only plasma taskmanagers are present</i>")
enabled: !(dock.tasksPresent() && !dock.latteTasksPresent());
onClicked: {
plasmoid.configuration.autoDecreaseIconSize = checked