summaryrefslogtreecommitdiff
path: root/modules/launcher/items
diff options
context:
space:
mode:
Diffstat (limited to 'modules/launcher/items')
-rw-r--r--modules/launcher/items/AppItem.qml19
1 files changed, 17 insertions, 2 deletions
diff --git a/modules/launcher/items/AppItem.qml b/modules/launcher/items/AppItem.qml
index 48aace7..2bd818d 100644
--- a/modules/launcher/items/AppItem.qml
+++ b/modules/launcher/items/AppItem.qml
@@ -2,6 +2,7 @@ import "../services"
import qs.components
import qs.services
import qs.config
+import qs.utils
import Quickshell
import Quickshell.Widgets
import QtQuick
@@ -46,7 +47,7 @@ Item {
anchors.leftMargin: Appearance.spacing.normal
anchors.verticalCenter: icon.verticalCenter
- implicitWidth: parent.width - icon.width
+ implicitWidth: parent.width - icon.width - favouriteIcon.width
implicitHeight: name.implicitHeight + comment.implicitHeight
StyledText {
@@ -64,10 +65,24 @@ Item {
color: Colours.palette.m3outline
elide: Text.ElideRight
- width: root.width - icon.width - Appearance.rounding.normal * 2
+ width: root.width - icon.width - favouriteIcon.width - Appearance.rounding.normal * 2
anchors.top: name.bottom
}
}
+
+ Loader {
+ id: favouriteIcon
+
+ anchors.verticalCenter: parent.verticalCenter
+ anchors.right: parent.right
+ active: modelData && Strings.testRegexList(Config.launcher.favouriteApps, modelData.id)
+
+ sourceComponent: MaterialIcon {
+ text: "favorite"
+ fill: 1
+ color: Colours.palette.m3primary
+ }
+ }
}
}