Changeset View
Changeset View
Standalone View
Standalone View
containments/desktop/package/contents/ui/FolderView.qml
Show First 20 Lines • Show All 577 Lines • ▼ Show 20 Line(s) | 570 | function calcExtraSpacing(cellSize, containerSize) { | |||
---|---|---|---|---|---|
578 | return extraSpacing; | 578 | return extraSpacing; | ||
579 | } | 579 | } | ||
580 | 580 | | |||
581 | cellWidth: { | 581 | cellWidth: { | ||
582 | if (root.useListViewMode) { | 582 | if (root.useListViewMode) { | ||
583 | return gridView.width; | 583 | return gridView.width; | ||
584 | } else { | 584 | } else { | ||
585 | var iconWidth = iconSize + (2 * units.largeSpacing) + (2 * units.smallSpacing); | 585 | var iconWidth = iconSize + (2 * units.largeSpacing) + (2 * units.smallSpacing); | ||
586 | if (root.isContainment && isRootView && scrollArea.viewportWidth > 0) { | 586 | if (isRootView && scrollArea.viewportWidth > 0) { | ||
587 | var extraWidth = calcExtraSpacing(iconWidth, scrollArea.viewportWidth); | 587 | iconWidth += calcExtraSpacing(iconWidth, scrollArea.viewportWidth); | ||
588 | return iconWidth + extraWidth; | | |||
589 | } else { | | |||
590 | return iconWidth; | | |||
591 | } | 588 | } | ||
589 | return iconWidth; | ||||
592 | } | 590 | } | ||
593 | } | 591 | } | ||
594 | 592 | | |||
595 | cellHeight: { | 593 | cellHeight: { | ||
596 | if (root.useListViewMode) { | 594 | if (root.useListViewMode) { | ||
597 | return Math.ceil((Math.max(theme.mSize(theme.defaultFont).height, iconSize) | 595 | return Math.ceil((Math.max(theme.mSize(theme.defaultFont).height, iconSize) | ||
598 | + Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, | 596 | + Math.max(highlightItemSvg.margins.top + highlightItemSvg.margins.bottom, | ||
599 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2; | 597 | listItemSvg.margins.top + listItemSvg.margins.bottom)) / 2) * 2; | ||
600 | } else { | 598 | } else { | ||
601 | var iconHeight = iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) + (6 * units.smallSpacing); | 599 | var iconHeight = iconSize + (theme.mSize(theme.defaultFont).height * plasmoid.configuration.textLines) + (6 * units.smallSpacing); | ||
602 | if (root.isContainment && isRootView && scrollArea.viewportHeight > 0) { | 600 | if (isRootView && scrollArea.viewportHeight > 0) { | ||
603 | var extraHeight = calcExtraSpacing(iconHeight, scrollArea.viewportHeight); | 601 | iconHeight += calcExtraSpacing(iconHeight, scrollArea.viewportHeight); | ||
604 | return iconHeight + extraHeight; | | |||
605 | } else { | | |||
606 | return iconHeight; | | |||
607 | } | 602 | } | ||
603 | return iconHeight; | ||||
608 | } | 604 | } | ||
609 | } | 605 | } | ||
610 | 606 | | |||
611 | delegate: FolderItemDelegate { | 607 | delegate: FolderItemDelegate { | ||
612 | width: gridView.cellWidth | 608 | width: gridView.cellWidth | ||
613 | height: gridView.cellHeight | 609 | height: gridView.cellHeight | ||
614 | } | 610 | } | ||
615 | 611 | | |||
▲ Show 20 Lines • Show All 731 Lines • Show Last 20 Lines |