Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 497 Lines • ▼ Show 20 Line(s) | 497 | return Math.ceil((Math.max(theme.mSize(theme.defaultFont).height, iconSize) | |||
---|---|---|---|---|---|
498 | + Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, | 498 | + Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, | ||
499 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2; | 499 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2; | ||
500 | } | 500 | } | ||
501 | 501 | | |||
502 | return (iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) | 502 | return (iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) | ||
503 | + (3 * units.smallSpacing) + (2 * units.largeSpacing)); | 503 | + (3 * units.smallSpacing) + (2 * units.largeSpacing)); | ||
504 | } | 504 | } | ||
505 | 505 | | |||
506 | model: positioner | | |||
507 | | ||||
508 | delegate: FolderItemDelegate { | 506 | delegate: FolderItemDelegate { | ||
509 | width: gridView.cellWidth | 507 | width: gridView.cellWidth | ||
510 | height: gridView.cellHeight | 508 | height: gridView.cellHeight | ||
511 | } | 509 | } | ||
512 | 510 | | |||
513 | onContentXChanged: { | 511 | onContentXChanged: { | ||
514 | if (hoveredItem) { | 512 | if (hoveredItem) { | ||
515 | hoverActivateTimer.stop(); | 513 | hoverActivateTimer.stop(); | ||
▲ Show 20 Lines • Show All 437 Lines • ▼ Show 20 Line(s) | 949 | Folder.FolderModel { | |||
953 | 951 | | |||
954 | usedByContainment: root.isContainment && main.isRootView | 952 | usedByContainment: root.isContainment && main.isRootView | ||
955 | sortDesc: plasmoid.configuration.sortDesc | 953 | sortDesc: plasmoid.configuration.sortDesc | ||
956 | sortDirsFirst: plasmoid.configuration.sortDirsFirst | 954 | sortDirsFirst: plasmoid.configuration.sortDirsFirst | ||
957 | parseDesktopFiles: (plasmoid.configuration.url == "desktop:/") | 955 | parseDesktopFiles: (plasmoid.configuration.url == "desktop:/") | ||
958 | previews: plasmoid.configuration.previews | 956 | previews: plasmoid.configuration.previews | ||
959 | previewPlugins: plasmoid.configuration.previewPlugins | 957 | previewPlugins: plasmoid.configuration.previewPlugins | ||
960 | 958 | | |||
959 | onListingStarted: { | ||||
960 | if (!gridView.model) { | ||||
961 | plasmoid.busy = true; | ||||
962 | } | ||||
963 | } | ||||
964 | | ||||
965 | onListingCompleted: { | ||||
966 | if (!gridView.model) { | ||||
967 | plasmoid.busy = false; | ||||
968 | gridView.model = positioner; | ||||
969 | } | ||||
970 | } | ||||
971 | | ||||
961 | onMove: { | 972 | onMove: { | ||
962 | var rows = (gridView.flow == GridView.FlowLeftToRight); | 973 | var rows = (gridView.flow == GridView.FlowLeftToRight); | ||
963 | var axis = rows ? gridView.width : gridView.height; | 974 | var axis = rows ? gridView.width : gridView.height; | ||
964 | var step = rows ? cellWidth : cellHeight; | 975 | var step = rows ? cellWidth : cellHeight; | ||
965 | var perStripe = Math.floor(axis / step); | 976 | var perStripe = Math.floor(axis / step); | ||
966 | var dropPos = mapToItem(gridView.contentItem, x, y); | 977 | var dropPos = mapToItem(gridView.contentItem, x, y); | ||
967 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | 978 | var leftEdge = Math.min(gridView.contentX, gridView.originX); | ||
968 | 979 | | |||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |