waffles: functioning search

This commit is contained in:
end-4
2025-12-05 00:19:21 +01:00
parent 8e704e4009
commit 9043ae7bf6
48 changed files with 648 additions and 88 deletions
@@ -11,7 +11,7 @@ import qs.modules.waffle.looks
WChoiceButton {
id: root
required property LauncherSearchResult entry
property bool firstEntry: false
@@ -21,45 +21,28 @@ WChoiceButton {
implicitHeight: contentLayout.implicitHeight + topPadding + bottomPadding
onClicked: {
GlobalStates.searchOpen = false
root.entry.execute()
execute();
}
function execute() {
GlobalStates.searchOpen = false;
root.entry.execute();
}
contentItem: RowLayout {
id: contentLayout
spacing: 8
EntryIcon {}
SearchEntryIcon {
entry: root.entry
iconSize: 24
}
EntryNameColumn {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
}
}
component EntryIcon: Item {
implicitWidth: 24
implicitHeight: 24
Loader {
anchors.centerIn: parent
active: root.entry.iconType === LauncherSearchResult.IconType.System
sourceComponent: WAppIcon {
implicitSize: 24
tryCustomIcon: false
iconName: root.entry.iconName
}
}
Loader {
anchors.centerIn: parent
active: root.entry.iconType === LauncherSearchResult.IconType.Text
sourceComponent: WText {
text: root.entry.iconName
font.pixelSize: 24
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
}
}
}
component EntryNameColumn: ColumnLayout {
spacing: 4
@@ -78,4 +61,11 @@ WChoiceButton {
color: Looks.colors.accentUnfocused
}
}
MouseArea {
anchors.fill: parent
// hoverEnabled: true
acceptedButtons: Qt.NoButton
cursorShape: Qt.PointingHandCursor
}
}