summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/launcher/ContentList.qml35
1 files changed, 19 insertions, 16 deletions
diff --git a/modules/launcher/ContentList.qml b/modules/launcher/ContentList.qml
index 93bb913..9c10077 100644
--- a/modules/launcher/ContentList.qml
+++ b/modules/launcher/ContentList.qml
@@ -3,6 +3,7 @@ pragma ComponentBehavior: Bound
import "root:/widgets"
import "root:/services"
import "root:/config"
+import "root:/utils"
import Quickshell
import QtQuick
import QtQuick.Controls
@@ -45,7 +46,7 @@ Item {
PropertyChanges {
root.currentList: wallpaperList.item
- root.implicitWidth: Math.max(Config.launcher.sizes.itemWidth, wallpaperList.implicitWidth)
+ root.implicitWidth: Math.max(Config.launcher.sizes.itemWidth * 1.2, wallpaperList.implicitWidth)
root.implicitHeight: Config.launcher.sizes.wallpaperHeight
wallpaperList.active: true
}
@@ -107,39 +108,41 @@ Item {
}
}
- Item {
+ Row {
id: empty
opacity: root.currentList?.count === 0 ? 1 : 0
scale: root.currentList?.count === 0 ? 1 : 0.5
- implicitWidth: icon.width + text.width + Appearance.spacing.small
- implicitHeight: icon.height
+ spacing: Appearance.spacing.normal
+ padding: Appearance.padding.large
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
MaterialIcon {
- id: icon
-
- text: "manage_search"
+ text: root.state === "wallpapers" ? "wallpaper_slideshow" : "manage_search"
color: Colours.palette.m3onSurfaceVariant
font.pointSize: Appearance.font.size.extraLarge
anchors.verticalCenter: parent.verticalCenter
}
- StyledText {
- id: text
-
- anchors.left: icon.right
- anchors.leftMargin: Appearance.spacing.small
+ Column {
anchors.verticalCenter: parent.verticalCenter
- text: qsTr("No results")
- color: Colours.palette.m3onSurfaceVariant
- font.pointSize: Appearance.font.size.larger
- font.weight: 500
+ StyledText {
+ text: root.state === "wallpapers" ? qsTr("No wallpapers found") : qsTr("No results")
+ color: Colours.palette.m3onSurfaceVariant
+ font.pointSize: Appearance.font.size.larger
+ font.weight: 500
+ }
+
+ StyledText {
+ text: root.state === "wallpapers" && Wallpapers.list.length === 0 ? qsTr("Try putting some wallpapers in %1").arg(Paths.shortenHome(Config.paths.wallpaperDir)) : qsTr("Try searching for something else")
+ color: Colours.palette.m3onSurfaceVariant
+ font.pointSize: Appearance.font.size.normal
+ }
}
Behavior on opacity {