Compare commits
3 Commits
bf1903ddcd
...
98687febb9
| Author | SHA1 | Date | |
|---|---|---|---|
| 98687febb9 | |||
| fcceb77987 | |||
| 5354103844 |
@@ -54,7 +54,11 @@ Rectangle {
|
|||||||
onTriggered: () => {
|
onTriggered: () => {
|
||||||
pageLoader.page = "pages/HomePage.qml"
|
pageLoader.page = "pages/HomePage.qml"
|
||||||
|
|
||||||
currentMenuButton.selected = false
|
if(currentMenuButton !== null)
|
||||||
|
{
|
||||||
|
currentMenuButton.selected = false
|
||||||
|
}
|
||||||
|
|
||||||
currentMenuButton = this
|
currentMenuButton = this
|
||||||
|
|
||||||
searchContainer.preferredHeight = 0
|
searchContainer.preferredHeight = 0
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import QtQuick
|
import QtQuick
|
||||||
import QtQuick.Controls
|
import QtQuick.Controls
|
||||||
import QtQuick.Layouts
|
import QtQuick.Layouts
|
||||||
|
import QtQuick.Effects
|
||||||
|
|
||||||
import KomplexHub
|
import KomplexHub
|
||||||
import KomplexHub.Controls
|
import KomplexHub.Controls
|
||||||
import KomplexHub.Kero
|
import KomplexHub.Kero
|
||||||
@@ -8,7 +10,9 @@ import KomplexHubPlugin
|
|||||||
|
|
||||||
Item {
|
Item {
|
||||||
readonly property bool searchable: false
|
readonly property bool searchable: false
|
||||||
property int resultsPerRow: (homePageRoot.width - (64 + Constants.largeMargin)) / (256 + Constants.largeMargin)
|
property int resultsPerRow: (homePageRoot.width - (64 + Constants.largeMargin)) / (resultWidth + Constants.largeMargin) + 1
|
||||||
|
property int resultWidth: 256
|
||||||
|
property int resultHeight: 256
|
||||||
|
|
||||||
id: homePageRoot
|
id: homePageRoot
|
||||||
|
|
||||||
@@ -30,68 +34,117 @@ Item {
|
|||||||
resultsPerPage: homePageRoot.resultsPerRow
|
resultsPerPage: homePageRoot.resultsPerRow
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle
|
||||||
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: palette.base
|
color: palette.base
|
||||||
|
|
||||||
ScrollView {
|
ScrollView
|
||||||
|
{
|
||||||
|
id: newPacksView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.margins: Constants.largeMargin
|
anchors.margins: Constants.largeMargin
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
width: homePageRoot.width
|
{
|
||||||
|
width: newPacksView.width
|
||||||
|
|
||||||
// Featured Results
|
ColumnLayout
|
||||||
ColumnLayout {
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 420
|
height: 420
|
||||||
|
|
||||||
Text {
|
Text
|
||||||
|
{
|
||||||
color: palette.text
|
color: palette.text
|
||||||
font.pixelSize: Constants.h3Font.pixelSize
|
font.pixelSize: Constants.h2Font.pixelSize
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: "Newest Wallpaper Packs"
|
text: qsTr("Newest Wallpaper Packs")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 256
|
Layout.preferredHeight: 256
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: Constants.largeMargin
|
|
||||||
|
|
||||||
Repeater {
|
Rectangle
|
||||||
model: newestPacksModel
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
delegate: Item {
|
color: "transparent"
|
||||||
width: 256
|
|
||||||
height: 256
|
|
||||||
required property string name
|
|
||||||
required property string author
|
|
||||||
required property string description
|
|
||||||
required property string uuid
|
|
||||||
required property string thumbnail
|
|
||||||
required property string authorId
|
|
||||||
|
|
||||||
SearchResultItem
|
clip: true
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
clip: true
|
||||||
|
spacing: Constants.mediumMargin
|
||||||
|
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: newPacksMoreButton.left
|
||||||
|
anchors.leftMargin: Constants.largeMargin
|
||||||
|
anchors.rightMargin: Constants.largeMargin
|
||||||
|
|
||||||
|
Repeater
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
model: newestPacksModel
|
||||||
title: parent.name
|
|
||||||
author: parent.author
|
delegate: Item {
|
||||||
description: parent.description
|
width: resultWidth
|
||||||
thumbnail: parent.thumbnail
|
height: resultHeight
|
||||||
uuid: parent.uuid
|
|
||||||
|
required property string name
|
||||||
|
required property string author
|
||||||
|
required property string description
|
||||||
|
required property string uuid
|
||||||
|
required property string thumbnail
|
||||||
|
required property string authorId
|
||||||
|
|
||||||
|
SearchResultItem
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
title: parent.name
|
||||||
|
author: parent.author
|
||||||
|
description: parent.description
|
||||||
|
thumbnail: parent.thumbnail
|
||||||
|
uuid: parent.uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
SquareButton {
|
Rectangle
|
||||||
Layout.fillHeight: true
|
{
|
||||||
Layout.preferredWidth: 64
|
id: newestGradientMap
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: newPacksMoreButton.left
|
||||||
|
height: resultHeight
|
||||||
|
width: resultWidth / 4
|
||||||
|
|
||||||
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
gradient: Gradient
|
||||||
icon.height: 24
|
{
|
||||||
icon.width: 24
|
orientation: Gradient.Horizontal
|
||||||
|
GradientStop { position: 0.0; color: "transparent" }
|
||||||
|
GradientStop { position: 1.0; color: palette.light }
|
||||||
|
}
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
SquareButton
|
||||||
|
{
|
||||||
|
id: newPacksMoreButton
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: resultHeight
|
||||||
|
|
||||||
|
width: 64
|
||||||
|
|
||||||
|
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
||||||
|
icon.height: 24
|
||||||
|
icon.width: 24
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -100,55 +153,101 @@ Item {
|
|||||||
height: Constants.largeMargin
|
height: Constants.largeMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 420
|
height: 420
|
||||||
|
|
||||||
Text {
|
Text
|
||||||
|
{
|
||||||
color: palette.text
|
color: palette.text
|
||||||
font.pixelSize: Constants.h3Font.pixelSize
|
font.pixelSize: Constants.h2Font.pixelSize
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: "Featured Images"
|
text: qsTr("Featured Images")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 256
|
Layout.preferredHeight: 256
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: Constants.largeMargin
|
|
||||||
|
|
||||||
Repeater {
|
Rectangle
|
||||||
model: featuredImagesModel
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
delegate: Item {
|
color: "transparent"
|
||||||
width: 256
|
|
||||||
height: 256
|
|
||||||
required property string author
|
|
||||||
required property string description
|
|
||||||
required property string uuid
|
|
||||||
required property string thumbnail
|
|
||||||
required property string authorId
|
|
||||||
|
|
||||||
SearchResultItem
|
clip: true
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
clip: true
|
||||||
|
spacing: Constants.mediumMargin
|
||||||
|
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: featuredImagesMoreButton.left
|
||||||
|
anchors.leftMargin: Constants.largeMargin
|
||||||
|
anchors.rightMargin: Constants.largeMargin
|
||||||
|
|
||||||
|
Repeater
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
model: featuredImagesModel
|
||||||
title: parent.author
|
|
||||||
author: qsTr("Pexels Images")
|
delegate: Item
|
||||||
description: parent.description
|
{
|
||||||
thumbnail: parent.thumbnail
|
width: resultWidth
|
||||||
uuid: parent.uuid
|
height: resultHeight
|
||||||
|
|
||||||
|
required property string author
|
||||||
|
required property string description
|
||||||
|
required property string uuid
|
||||||
|
required property string thumbnail
|
||||||
|
required property string authorId
|
||||||
|
|
||||||
|
SearchResultItem
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
title: parent.author
|
||||||
|
author: qsTr("Pexels Images")
|
||||||
|
description: parent.description
|
||||||
|
thumbnail: parent.thumbnail
|
||||||
|
uuid: parent.uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
SquareButton {
|
Rectangle
|
||||||
Layout.fillHeight: true
|
{
|
||||||
Layout.preferredWidth: 64
|
anchors.top: parent.top
|
||||||
|
anchors.right: featuredImagesMoreButton.left
|
||||||
|
height: resultHeight
|
||||||
|
width: resultWidth / 4
|
||||||
|
|
||||||
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
gradient: Gradient
|
||||||
icon.height: 24
|
{
|
||||||
icon.width: 24
|
orientation: Gradient.Horizontal
|
||||||
|
GradientStop { position: 0.0; color: "transparent" }
|
||||||
|
GradientStop { position: 1.0; color: palette.light }
|
||||||
|
}
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
SquareButton
|
||||||
|
{
|
||||||
|
id: featuredImagesMoreButton
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: resultHeight
|
||||||
|
|
||||||
|
width: 64
|
||||||
|
|
||||||
|
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
||||||
|
icon.height: 24
|
||||||
|
icon.width: 24
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -157,55 +256,100 @@ Item {
|
|||||||
height: Constants.largeMargin
|
height: Constants.largeMargin
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout
|
||||||
|
{
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 420
|
height: 420
|
||||||
|
|
||||||
Text {
|
Text
|
||||||
|
{
|
||||||
color: palette.text
|
color: palette.text
|
||||||
font.pixelSize: Constants.h3Font.pixelSize
|
font.pixelSize: Constants.h2Font.pixelSize
|
||||||
font.bold: true
|
font.bold: true
|
||||||
text: "Featured Videos"
|
text: qsTr("Featured Videos")
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
|
{
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: 256
|
Layout.preferredHeight: 256
|
||||||
Layout.alignment: Qt.AlignHCenter
|
|
||||||
Layout.leftMargin: Constants.largeMargin
|
|
||||||
|
|
||||||
Repeater {
|
Rectangle
|
||||||
model: featuredVideosModel
|
{
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
|
||||||
delegate: Item {
|
color: "transparent"
|
||||||
width: 256
|
|
||||||
height: 256
|
|
||||||
required property string uuid
|
|
||||||
required property string author
|
|
||||||
required property string authorId
|
|
||||||
required property string authorUrl
|
|
||||||
required property string thumbnail
|
|
||||||
|
|
||||||
SearchResultItem
|
clip: true
|
||||||
|
Row
|
||||||
|
{
|
||||||
|
clip: true
|
||||||
|
spacing: Constants.mediumMargin
|
||||||
|
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: featuredVideosMoreButton.left
|
||||||
|
anchors.leftMargin: Constants.largeMargin
|
||||||
|
anchors.rightMargin: Constants.largeMargin
|
||||||
|
|
||||||
|
Repeater
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
model: featuredVideosModel
|
||||||
title: parent.author
|
|
||||||
author: parent.author
|
delegate: Item {
|
||||||
description: "Video provided by Pexels"
|
width: resultWidth
|
||||||
thumbnail: parent.thumbnail
|
height: resultHeight
|
||||||
uuid: parent.uuid
|
|
||||||
|
required property string uuid
|
||||||
|
required property string author
|
||||||
|
required property string authorId
|
||||||
|
required property string authorUrl
|
||||||
|
required property string thumbnail
|
||||||
|
|
||||||
|
SearchResultItem
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
title: parent.author
|
||||||
|
author: parent.author
|
||||||
|
description: "Video provided by Pexels"
|
||||||
|
thumbnail: parent.thumbnail
|
||||||
|
uuid: parent.uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
SquareButton {
|
Rectangle
|
||||||
Layout.fillHeight: true
|
{
|
||||||
Layout.preferredWidth: 64
|
anchors.top: parent.top
|
||||||
|
anchors.right: featuredVideosMoreButton.left
|
||||||
|
height: resultHeight
|
||||||
|
width: resultWidth / 4
|
||||||
|
|
||||||
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
gradient: Gradient
|
||||||
icon.height: 24
|
{
|
||||||
icon.width: 24
|
orientation: Gradient.Horizontal
|
||||||
|
GradientStop { position: 0.0; color: "transparent" }
|
||||||
|
GradientStop { position: 1.0; color: palette.light }
|
||||||
|
}
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
|
||||||
|
SquareButton
|
||||||
|
{
|
||||||
|
id: featuredVideosMoreButton
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.right: parent.right
|
||||||
|
height: resultHeight
|
||||||
|
|
||||||
|
width: 64
|
||||||
|
|
||||||
|
icon.source: "qrc:/images/icons/icons8-forward.svg"
|
||||||
|
icon.height: 24
|
||||||
|
icon.width: 24
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,9 +11,12 @@ Item
|
|||||||
{
|
{
|
||||||
property string query
|
property string query
|
||||||
readonly property bool searchable: true
|
readonly property bool searchable: true
|
||||||
property int resultsPerRow: (resultsView.width - (64 + Constants.largeMargin)) / (256 + Constants.largeMargin)
|
property int resultsPerRow: (resultsContainer.width - (Constants.largeMargin * 2)) / (resultWidth + Constants.mediumMargin)
|
||||||
property int rows: (resultsView.height - (Constants.largeMargin * 2) / (256 + Constants.largeMargin))
|
property int rows: ((resultsContainer.height - (Constants.largeMargin * 2)) / (resultHeight + Constants.mediumMargin))
|
||||||
property int resultsPerPage: resultsPerRow * rows
|
property int resultsPerPage: resultsPerRow * rows
|
||||||
|
property int emptyWidth: (resultsContainer.width - (Constants.largeMargin * 2)) - (resultsPerRow * (resultWidth + Constants.mediumMargin))
|
||||||
|
property int resultWidth: 256
|
||||||
|
property int resultHeight: 245
|
||||||
|
|
||||||
id: imageSearchPageRoot
|
id: imageSearchPageRoot
|
||||||
|
|
||||||
@@ -29,58 +32,87 @@ Item
|
|||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: palette.base
|
color: palette.base
|
||||||
|
|
||||||
ScrollView
|
Rectangle
|
||||||
{
|
{
|
||||||
id: resultsView
|
id: resultsContainer
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: buttonBoxLayout.top
|
anchors.bottom: buttonBoxLayout.top
|
||||||
|
|
||||||
GridLayout {
|
color: "transparent"
|
||||||
anchors.left: parent.left
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.top: parent.top
|
|
||||||
|
|
||||||
anchors.margins: Constants.largeMargin
|
ScrollView
|
||||||
columns: imageSearchPageRoot.resultsPerRow
|
{
|
||||||
|
id: resultsView
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
Repeater {
|
RowLayout
|
||||||
model: searchModel
|
{
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.margins: Constants.largeMargin
|
||||||
|
|
||||||
delegate: Item {
|
Item
|
||||||
width: 256
|
{
|
||||||
height: 256
|
Layout.fillHeight: true
|
||||||
required property string author
|
Layout.preferredWidth: emptyWidth / 2
|
||||||
required property string description
|
Layout.maximumWidth: emptyWidth / 2
|
||||||
required property string uuid
|
}
|
||||||
required property string thumbnail
|
|
||||||
required property string authorId
|
|
||||||
|
|
||||||
SearchResultItem
|
GridLayout
|
||||||
|
{
|
||||||
|
Layout.fillHeight: true
|
||||||
|
Layout.fillWidth: true
|
||||||
|
|
||||||
|
columns: imageSearchPageRoot.resultsPerRow
|
||||||
|
columnSpacing: Constants.mediumMargin
|
||||||
|
rowSpacing: Constants.mediumMargin
|
||||||
|
|
||||||
|
Repeater
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
model: searchModel
|
||||||
title: parent.author
|
|
||||||
author: qsTr("Pexels Images")
|
delegate: Item
|
||||||
description: parent.description
|
{
|
||||||
thumbnail: parent.thumbnail
|
width: 256
|
||||||
uuid: parent.uuid
|
height: 245
|
||||||
|
required property string author
|
||||||
|
required property string description
|
||||||
|
required property string uuid
|
||||||
|
required property string thumbnail
|
||||||
|
required property string authorId
|
||||||
|
|
||||||
|
SearchResultItem
|
||||||
|
{
|
||||||
|
anchors.fill: parent
|
||||||
|
title: parent.author
|
||||||
|
author: qsTr("Pexels Images")
|
||||||
|
description: parent.description
|
||||||
|
thumbnail: parent.thumbnail
|
||||||
|
uuid: parent.uuid
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RowLayout {
|
RowLayout
|
||||||
|
{
|
||||||
id: buttonBoxLayout
|
id: buttonBoxLayout
|
||||||
height: 50
|
height: 35
|
||||||
|
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.margins: Constants.largeMargin
|
||||||
|
|
||||||
SquareButton {
|
SquareButton
|
||||||
|
{
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: 128
|
Layout.preferredWidth: 128
|
||||||
|
|
||||||
@@ -89,11 +121,14 @@ Item
|
|||||||
icon.width: 16
|
icon.width: 16
|
||||||
text: qsTr("Previous")
|
text: qsTr("Previous")
|
||||||
enabled: searchModel.hasPreviousPage
|
enabled: searchModel.hasPreviousPage
|
||||||
|
|
||||||
|
onTriggered: () => searchModel.previousPage()
|
||||||
}
|
}
|
||||||
|
|
||||||
Item { Layout.fillWidth: true }
|
Item { Layout.fillWidth: true }
|
||||||
|
|
||||||
SquareButton {
|
SquareButton
|
||||||
|
{
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: 128
|
Layout.preferredWidth: 128
|
||||||
|
|
||||||
@@ -102,25 +137,30 @@ Item
|
|||||||
icon.width: 16
|
icon.width: 16
|
||||||
text: qsTr("Next")
|
text: qsTr("Next")
|
||||||
enabled: searchModel.hasNextPage
|
enabled: searchModel.hasNextPage
|
||||||
|
|
||||||
|
onTriggered: () => searchModel.nextPage()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KeroErrorAvatar {
|
KeroErrorAvatar
|
||||||
|
{
|
||||||
id: errorOverlay
|
id: errorOverlay
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
KeroNoResultsAvatar {
|
KeroNoResultsAvatar
|
||||||
|
{
|
||||||
id: noResultsOverlay
|
id: noResultsOverlay
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
KeroLoadingAnimation {
|
KeroLoadingAnimation
|
||||||
|
{
|
||||||
id: loadingOverlay
|
id: loadingOverlay
|
||||||
|
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@@ -128,7 +168,8 @@ Item
|
|||||||
}
|
}
|
||||||
|
|
||||||
states: [
|
states: [
|
||||||
State {
|
State
|
||||||
|
{
|
||||||
name: "loading"
|
name: "loading"
|
||||||
when: searchModel.state == ImageSearchModel.Loading
|
when: searchModel.state == ImageSearchModel.Loading
|
||||||
|
|
||||||
@@ -143,7 +184,8 @@ Item
|
|||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State
|
||||||
|
{
|
||||||
name: "empty"
|
name: "empty"
|
||||||
when: searchModel.totalResults === 0
|
when: searchModel.totalResults === 0
|
||||||
|
|
||||||
@@ -157,12 +199,14 @@ Item
|
|||||||
target: resultsView
|
target: resultsView
|
||||||
opacity: 0
|
opacity: 0
|
||||||
}
|
}
|
||||||
PropertyChanges {
|
PropertyChanges
|
||||||
|
{
|
||||||
target: buttonBoxLayout
|
target: buttonBoxLayout
|
||||||
visible: false
|
visible: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
State {
|
State
|
||||||
|
{
|
||||||
name: "error"
|
name: "error"
|
||||||
when: searchModel.state == ImageSearchModel.Error
|
when: searchModel.state == ImageSearchModel.Error
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public:
|
|||||||
|
|
||||||
QList<T> dataChunk;
|
QList<T> dataChunk;
|
||||||
|
|
||||||
for(qsizetype i = index; i < count; ++i)
|
for(qsizetype i = index; (i - index) < count; ++i)
|
||||||
{
|
{
|
||||||
T data = m_cache.at(i);
|
T data = m_cache.at(i);
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
SettingsManager::SettingsManager(QObject *parent) : QObject(parent)
|
SettingsManager::SettingsManager(QObject *parent) : QObject(parent)
|
||||||
{
|
{
|
||||||
m_homeLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation).at(0);
|
m_homeLocation = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
||||||
|
|
||||||
m_shaderPackLocation = m_homeLocation + QString("/.local/share/komplex/packs");
|
m_shaderPackLocation = m_homeLocation + QString("/.local/share/komplex/packs");
|
||||||
m_configLocation = m_homeLocation + QString("/.config/plasma-org.kde.plasma.desktop-appletsrc");
|
m_configLocation = m_homeLocation + QString("/.config/plasma-org.kde.plasma.desktop-appletsrc");
|
||||||
|
|||||||
Reference in New Issue
Block a user