Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/main.qml
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Line(s) | 36 | FolderViewDropArea { | |||
---|---|---|---|---|---|
77 | Plasmoid.associatedApplicationUrls: folderViewLayer.ready ? folderViewLayer.model.resolvedUrl : null | 77 | Plasmoid.associatedApplicationUrls: folderViewLayer.ready ? folderViewLayer.model.resolvedUrl : null | ||
78 | 78 | | |||
79 | onIconHeightChanged: updateGridSize() | 79 | onIconHeightChanged: updateGridSize() | ||
80 | 80 | | |||
81 | anchors { | 81 | anchors { | ||
82 | leftMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.x : 0 | 82 | leftMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.x : 0 | ||
83 | topMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.y : 0 | 83 | topMargin: (isContainment && plasmoid.availableScreenRect) ? plasmoid.availableScreenRect.y : 0 | ||
84 | 84 | | |||
85 | // Don't apply the right margin if the folderView is in column mode and not overflowing. | 85 | rightMargin: (isContainment && plasmoid.availableScreenRect) && parent | ||
86 | // In this way, the last column remains droppable even if a small part of the icon is behind a panel. | | |||
87 | rightMargin: folderViewLayer.ready && (folderViewLayer.view.overflowing || folderViewLayer.view.flow == GridView.FlowLeftToRight | | |||
88 | || folderViewLayer.view.layoutDirection == Qt.RightToLeft) | | |||
89 | && (isContainment && plasmoid.availableScreenRect) && parent | | |||
90 | ? parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width) : 0 | 86 | ? parent.width - (plasmoid.availableScreenRect.x + plasmoid.availableScreenRect.width) : 0 | ||
91 | 87 | | |||
92 | // Same mechanism as the right margin but applied here to the bottom when the folderView is in row mode. | 88 | bottomMargin: (isContainment && plasmoid.availableScreenRect) && parent | ||
93 | bottomMargin: folderViewLayer.ready && (folderViewLayer.view.overflowing || folderViewLayer.view.flow == GridView.FlowTopToBottom) | | |||
94 | && (isContainment && plasmoid.availableScreenRect) && parent | | |||
95 | ? parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height) : 0 | 89 | ? parent.height - (plasmoid.availableScreenRect.y + plasmoid.availableScreenRect.height) : 0 | ||
96 | } | 90 | } | ||
97 | 91 | | |||
98 | Behavior on anchors.topMargin { | 92 | Behavior on anchors.topMargin { | ||
99 | NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad } | 93 | NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad } | ||
100 | } | 94 | } | ||
101 | Behavior on anchors.leftMargin { | 95 | Behavior on anchors.leftMargin { | ||
102 | NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad } | 96 | NumberAnimation { duration: units.longDuration; easing.type: Easing.InOutQuad } | ||
▲ Show 20 Lines • Show All 481 Lines • Show Last 20 Lines |