2021-09-09 14:33:57 +03:00
|
|
|
import QtQml 2.15
|
|
|
|
import QtQuick 2.15
|
2022-08-09 00:40:19 +03:00
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
import QtGraphicalEffects 1.15
|
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
import Style 1.0
|
|
|
|
|
2022-08-09 00:40:19 +03:00
|
|
|
ColumnLayout {
|
2021-09-09 14:33:57 +03:00
|
|
|
id: unifiedSearchResultsListViewSkeletonColumn
|
|
|
|
|
2022-07-11 18:52:31 +03:00
|
|
|
property int animationRectangleWidth: Style.trayWindowWidth
|
|
|
|
|
2022-08-09 00:40:19 +03:00
|
|
|
Item {
|
|
|
|
id: placeholderSectionHeader
|
|
|
|
|
|
|
|
property rect textRect: fontMetrics.boundingRect("Dummy text")
|
|
|
|
|
|
|
|
Layout.topMargin: Style.unifiedSearchResultSectionItemVerticalPadding / 2
|
|
|
|
Layout.bottomMargin: Style.unifiedSearchResultSectionItemVerticalPadding / 2
|
|
|
|
Layout.leftMargin: Style.unifiedSearchResultSectionItemLeftPadding
|
|
|
|
|
|
|
|
width: textRect.width
|
|
|
|
height: textRect.height
|
|
|
|
|
|
|
|
FontMetrics {
|
|
|
|
id: fontMetrics
|
|
|
|
font.pixelSize: Style.unifiedSearchResultTitleFontSize
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: placeholderSectionHeaderRectangle
|
|
|
|
anchors.fill: parent
|
|
|
|
radius: Style.veryRoundedButtonRadius
|
|
|
|
color: Style.lightHover
|
|
|
|
clip: true
|
|
|
|
visible: false
|
|
|
|
|
|
|
|
Loader {
|
|
|
|
x: mapFromItem(placeholderSectionHeader, 0, 0).x
|
|
|
|
height: parent.height
|
|
|
|
sourceComponent: UnifiedSearchResultItemSkeletonGradientRectangle {
|
|
|
|
width: unifiedSearchResultsListViewSkeletonColumn.animationRectangleWidth
|
|
|
|
height: parent.height
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: placeholderSectionHeaderMask
|
|
|
|
anchors.fill: placeholderSectionHeaderRectangle
|
|
|
|
color: "white"
|
|
|
|
radius: Style.veryRoundedButtonRadius
|
|
|
|
visible: false
|
|
|
|
}
|
|
|
|
|
|
|
|
OpacityMask {
|
|
|
|
anchors.fill: placeholderSectionHeaderRectangle
|
|
|
|
source: placeholderSectionHeaderRectangle
|
|
|
|
maskSource: placeholderSectionHeaderMask
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-09 14:33:57 +03:00
|
|
|
Repeater {
|
2022-07-11 18:52:31 +03:00
|
|
|
model: Math.ceil(unifiedSearchResultsListViewSkeletonColumn.height / Style.trayWindowHeaderHeight)
|
2021-09-09 14:33:57 +03:00
|
|
|
UnifiedSearchResultItemSkeleton {
|
|
|
|
width: unifiedSearchResultsListViewSkeletonColumn.width
|
2022-07-11 18:52:31 +03:00
|
|
|
height: Style.trayWindowHeaderHeight
|
|
|
|
animationRectangleWidth: unifiedSearchResultsListViewSkeletonColumn.animationRectangleWidth
|
2021-09-09 14:33:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|