Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 142 Lines • ▼ Show 20 Line(s) | 142 | Connections { | |||
---|---|---|---|---|---|
143 | target: dir | 143 | target: dir | ||
144 | onPopupMenuAboutToShow: { | 144 | onPopupMenuAboutToShow: { | ||
145 | if (!plasmoid.immutable) { | 145 | if (!plasmoid.immutable) { | ||
146 | plasmoid.processMimeData(mimeData, x, y, dropJob); | 146 | plasmoid.processMimeData(mimeData, x, y, dropJob); | ||
147 | } | 147 | } | ||
148 | } | 148 | } | ||
149 | } | 149 | } | ||
150 | 150 | | |||
151 | Connections { | ||||
152 | target: plasmoid | ||||
153 | onExpandedChanged: { | ||||
154 | if (plasmoid.expanded && dir.status === Folder.FolderModel.Ready && !gridView.model) { | ||||
155 | gridView.model = positioner; | ||||
156 | } | ||||
157 | } | ||||
158 | } | ||||
159 | | ||||
151 | // Lower the toolBox when an item is hovered, so it doesn't interfere with | 160 | // Lower the toolBox when an item is hovered, so it doesn't interfere with | ||
152 | // its interaction (e.g. the selection button in the top left, cf. Bug 337060) | 161 | // its interaction (e.g. the selection button in the top left, cf. Bug 337060) | ||
153 | Binding { | 162 | Binding { | ||
154 | target: toolBox | 163 | target: toolBox | ||
155 | property: "z" | 164 | property: "z" | ||
156 | // 999 is the default "z" for desktop ToolBoxRoot | 165 | // 999 is the default "z" for desktop ToolBoxRoot | ||
157 | value: main.hoveredItem ? -100 : 999 | 166 | value: main.hoveredItem ? -100 : 999 | ||
158 | when: toolBox | 167 | when: toolBox | ||
▲ Show 20 Lines • Show All 897 Lines • ▼ Show 20 Line(s) | 1062 | Folder.FolderModel { | |||
1056 | usedByContainment: root.isContainment && main.isRootView | 1065 | usedByContainment: root.isContainment && main.isRootView | ||
1057 | sortDesc: plasmoid.configuration.sortDesc | 1066 | sortDesc: plasmoid.configuration.sortDesc | ||
1058 | sortDirsFirst: plasmoid.configuration.sortDirsFirst | 1067 | sortDirsFirst: plasmoid.configuration.sortDirsFirst | ||
1059 | parseDesktopFiles: (plasmoid.configuration.url == "desktop:/") | 1068 | parseDesktopFiles: (plasmoid.configuration.url == "desktop:/") | ||
1060 | previews: plasmoid.configuration.previews | 1069 | previews: plasmoid.configuration.previews | ||
1061 | previewPlugins: plasmoid.configuration.previewPlugins | 1070 | previewPlugins: plasmoid.configuration.previewPlugins | ||
1062 | 1071 | | |||
1063 | onListingCompleted: { | 1072 | onListingCompleted: { | ||
1064 | if (!gridView.model) { | 1073 | if (!gridView.model && plasmoid.expanded) { | ||
1065 | gridView.model = positioner; | 1074 | gridView.model = positioner; | ||
1066 | } | 1075 | } | ||
1067 | } | 1076 | } | ||
1068 | 1077 | | |||
1069 | onMove: { | 1078 | onMove: { | ||
1070 | var rows = (gridView.flow == GridView.FlowLeftToRight); | 1079 | var rows = (gridView.flow == GridView.FlowLeftToRight); | ||
1071 | var axis = rows ? gridView.width : gridView.height; | 1080 | var axis = rows ? gridView.width : gridView.height; | ||
1072 | var step = rows ? cellWidth : cellHeight; | 1081 | var step = rows ? cellWidth : cellHeight; | ||
▲ Show 20 Lines • Show All 244 Lines • Show Last 20 Lines |