Commit 9141f0c4 authored by LNJ's avatar LNJ 💬

Revert "Fix ubuntu touch issue with emoji picker / Qt 5.9"

This reverts commit d3ace24c.
parent 335dcfc2
......@@ -15,7 +15,7 @@ class Emoji
Q_PROPERTY(Emoji::Group group READ group CONSTANT)
public:
enum Group {
enum class Group {
Invalid = -1,
Favorites,
People,
......
......@@ -277,7 +277,7 @@ Kirigami.ScrollablePage {
id: emojiPicker
model: EmojiProxyModel {
group: Emoji.People
group: Emoji.Group.People
sourceModel: EmojiModel {}
}
......
......@@ -92,16 +92,16 @@ Popup {
Row {
Repeater {
model: ListModel {
ListElement { label: "🔖"; group: Emoji.Favorites }
ListElement { label: "😏"; group: Emoji.People }
ListElement { label: "🌲"; group: Emoji.Nature }
ListElement { label: "🍛"; group: Emoji.Food }
ListElement { label: "🚁"; group: Emoji.Activity }
ListElement { label: "🚅"; group: Emoji.Travel }
ListElement { label: "💡"; group: Emoji.Objects }
ListElement { label: "🔣"; group: Emoji.Symbols }
ListElement { label: "🏁"; group: Emoji.Flags }
ListElement { label: "🔍"; group: Emoji.Invalid }
ListElement { label: "🔖"; group: Emoji.Group.Favorites }
ListElement { label: "😏"; group: Emoji.Group.People }
ListElement { label: "🌲"; group: Emoji.Group.Nature }
ListElement { label: "🍛"; group: Emoji.Group.Food }
ListElement { label: "🚁"; group: Emoji.Group.Activity }
ListElement { label: "🚅"; group: Emoji.Group.Travel }
ListElement { label: "💡"; group: Emoji.Group.Objects }
ListElement { label: "🔣"; group: Emoji.Group.Symbols }
ListElement { label: "🏁"; group: Emoji.Group.Flags }
ListElement { label: "🔍"; group: Emoji.Group.Invalid }
}
delegate: ItemDelegate {
......@@ -119,25 +119,25 @@ Popup {
hoverEnabled: true
ToolTip.text: {
switch (model.group) {
case Emoji.Favorites:
case Emoji.Group.Favorites:
return qsTr('Favorites');
case Emoji.People:
case Emoji.Group.People:
return qsTr('People');
case Emoji.Nature:
case Emoji.Group.Nature:
return qsTr('Nature');
case Emoji.Food:
case Emoji.Group.Food:
return qsTr('Food');
case Emoji.Activity:
case Emoji.Group.Activity:
return qsTr('Activity');
case Emoji.Travel:
case Emoji.Group.Travel:
return qsTr('Travel');
case Emoji.Objects:
case Emoji.Group.Objects:
return qsTr('Objects');
case Emoji.Symbols:
case Emoji.Group.Symbols:
return qsTr('Symbols');
case Emoji.Flags:
case Emoji.Group.Flags:
return qsTr('Flags');
case Emoji.Invalid:
case Emoji.Group.Invalid:
return qsTr('Search');
}
}
......@@ -162,7 +162,7 @@ Popup {
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
visible: root.model.group === Emoji.Invalid
visible: root.model.group === Emoji.Group.Invalid
placeholderText: qsTr("Search emoji")
selectByMouse: true
background: Item {}
......@@ -172,6 +172,7 @@ Popup {
id: clearButton
visible: searchField.text !== ''
icon.name: 'edit-clear'
focusPolicy: Qt.NoFocus
anchors {
......@@ -179,16 +180,6 @@ Popup {
right: parent.right
}
Kirigami.Icon {
source: 'edit-clear'
height: 24
width: height
anchors {
centerIn: parent
}
}
onClicked: searchField.clear()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment