diff --git a/KomplexHubContent/pages/HomePage.qml b/KomplexHubContent/pages/HomePage.qml index 30511ca..7665e36 100644 --- a/KomplexHubContent/pages/HomePage.qml +++ b/KomplexHubContent/pages/HomePage.qml @@ -282,7 +282,6 @@ Item anchors.fill: parent opacity: 0 visible: opacity > 0.01 - //model: videosModel.itemModel Behavior on opacity { NumberAnimation @@ -298,7 +297,6 @@ Item anchors.fill: parent opacity: 0 visible: opacity > 0.01 - //model: videosModel.itemModel Behavior on opacity { NumberAnimation @@ -316,48 +314,83 @@ Item } } - FeaturedVideosPage + Component { - id: featuredVideosPage - anchors.fill: parent - opacity: 0 - visible: opacity > 0.01 + id: featuredVideosComponent - Behavior on opacity { - NumberAnimation - { - duration: 250 + FeaturedVideosPage + { + id: featuredVideosPage + anchors.fill: parent + opacity: 0 + + Behavior on opacity { + NumberAnimation + { + duration: 250 + } } + + Component.onCompleted: () => featuredVideosPage.opacity = 1 } } - FeaturedPacksPage + Component { - id: featuredPacksPage - anchors.fill: parent - opacity: 0 - visible: opacity > 0.01 + id: featuredPacksComponent - Behavior on opacity { - NumberAnimation + FeaturedPacksPage + { + id: featuredPacksPage + anchors.fill: parent + opacity: 0 + + Behavior on opacity { - duration: 250 + NumberAnimation + { + duration: 250 + } } + + Component.onCompleted: () => featuredPacksPage.opacity = 1 } } - FeaturedImagesPage + Component { - id: featuredImagesPage + id: featuredImagesComponent + + FeaturedImagesPage + { + id: featuredImagesPage + anchors.fill: parent + opacity: 0 + + Behavior on opacity + { + NumberAnimation + { + duration: 250 + } + } + + Component.onCompleted: () => featuredImagesPage.opacity = 1 + } + } + + Item + { + id: featuredLoaderItem anchors.fill: parent opacity: 0 visible: opacity > 0.01 + enabled: visible - Behavior on opacity { - NumberAnimation - { - duration: 250 - } + Loader + { + id: featuredLoader + anchors.fill: parent } } @@ -427,21 +460,24 @@ Item function showFeaturedVideosPage() { resultsLayout.opacity = 0 - featuredVideosPage.opacity = 1 + featuredLoaderItem.opacity = 1 + featuredLoader.sourceComponent = featuredVideosComponent popup = true } function showFeaturedPacksPage() { resultsLayout.opacity = 0 - featuredPacksPage.opacity = 1 + featuredLoaderItem.opacity = 1 + featuredLoader.sourceComponent = featuredPacksComponent popup = true } function showFeaturedImagesPage() { resultsLayout.opacity = 0 - featuredImagesPage.opacity = 1 + featuredLoaderItem.opacity = 1 + featuredLoader.sourceComponent = featuredImagesComponent popup = true } @@ -496,25 +532,13 @@ Item function closePopup() { - if(featuredVideosPage.popup) + if(featuredLoader.item && featuredLoader.item.popup) { - featuredVideosPage.closePopup() - return - } - if(featuredImagesPage.popup) - { - featuredImagesPage.closePopup() - return - } - if(featuredPacksPage.popup) - { - featuredPacksPage.closePopup() + featuredLoader.item.closePopup() return } - featuredVideosPage.opacity = 0 - featuredImagesPage.opacity = 0 - featuredPacksPage.opacity = 0 + featuredLoaderItem.opacity = 0 viewMoreImagePopup.opacity = 0 viewMoreVideoPopup.opacity = 0 viewMoreWallpaperPopup.opacity = 0 diff --git a/KomplexHubContent/pages/LiveSearchPage.qml b/KomplexHubContent/pages/LiveSearchPage.qml index cd7b129..98237ba 100644 --- a/KomplexHubContent/pages/LiveSearchPage.qml +++ b/KomplexHubContent/pages/LiveSearchPage.qml @@ -33,8 +33,8 @@ Item { id: resultDelegate - width: 256 - height: 245 + width: resultWidth + height: resultHeight required property string name required property string author @@ -47,7 +47,8 @@ Item SearchResultItem { anchors.fill: parent - title: parent.author + title: parent.name + author: parent.author description: parent.description thumbnail: parent.thumbnail uuid: parent.uuid