Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/main.qml
Show First 20 Lines • Show All 323 Lines • ▼ Show 20 Line(s) | 38 | FolderViewDropArea { | |||
---|---|---|---|---|---|
324 | ContainmentLayoutManager.AppletsLayout { | 324 | ContainmentLayoutManager.AppletsLayout { | ||
325 | id: appletsLayout | 325 | id: appletsLayout | ||
326 | anchors.fill: parent | 326 | anchors.fill: parent | ||
327 | // NOTE: use plasmoid.availableScreenRect and not own width and height as they are updated not atomically | 327 | // NOTE: use plasmoid.availableScreenRect and not own width and height as they are updated not atomically | ||
328 | configKey: plasmoid.availableScreenRect.width > plasmoid.availableScreenRect.height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical" | 328 | configKey: plasmoid.availableScreenRect.width > plasmoid.availableScreenRect.height ? "ItemGeometriesHorizontal" : "ItemGeometriesVertical" | ||
329 | containment: plasmoid | 329 | containment: plasmoid | ||
330 | editModeCondition: plasmoid.immutable | 330 | editModeCondition: plasmoid.immutable | ||
331 | ? ContainmentLayoutManager.AppletsLayout.Locked | 331 | ? ContainmentLayoutManager.AppletsLayout.Locked | ||
332 | : ContainmentLayoutManager.AppletsLayout.Manual | 332 | : ContainmentLayoutManager.AppletsLayout.AfterPressAndHold | ||
333 | 333 | | |||
334 | // Sets the containment in edit mode when we go in edit mode as well | 334 | // Sets the containment in edit mode when we go in edit mode as well | ||
335 | onEditModeChanged: plasmoid.editMode = editMode | 335 | onEditModeChanged: plasmoid.editMode = editMode | ||
336 | 336 | | |||
337 | minimumItemWidth: units.gridUnit * 3 | 337 | minimumItemWidth: units.gridUnit * 3 | ||
338 | minimumItemHeight: minimumItemWidth | 338 | minimumItemHeight: minimumItemWidth | ||
339 | 339 | | |||
340 | cellWidth: units.iconSizes.small | 340 | cellWidth: units.iconSizes.small | ||
341 | cellHeight: cellWidth | 341 | cellHeight: cellWidth | ||
342 | 342 | | |||
343 | eventManagerToFilter: folderViewLayer.item ? folderViewLayer.item.view.view : null | ||||
344 | | ||||
343 | appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer { | 345 | appletContainerComponent: ContainmentLayoutManager.BasicAppletContainer { | ||
344 | id: appletContainer | 346 | id: appletContainer | ||
345 | editModeCondition: plasmoid.immutable | 347 | editModeCondition: plasmoid.immutable | ||
346 | ? ContainmentLayoutManager.ItemContainer.Locked | 348 | ? ContainmentLayoutManager.ItemContainer.Locked | ||
347 | : (plasmoid.configuration.pressToMove ? ContainmentLayoutManager.ItemContainer.AfterPressAndHold : ContainmentLayoutManager.ItemContainer.AfterMouseOver) | 349 | : (plasmoid.configuration.pressToMove ? ContainmentLayoutManager.ItemContainer.AfterPressAndHold : ContainmentLayoutManager.ItemContainer.AfterMouseOver) | ||
348 | configOverlayComponent: ConfigOverlay {} | 350 | configOverlayComponent: ConfigOverlay {} | ||
349 | onUserDrag: { | 351 | onUserDrag: { | ||
350 | var pos = mapToItem(root.parent, dragCenter.x, dragCenter.y); | 352 | var pos = mapToItem(root.parent, dragCenter.x, dragCenter.y); | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |