Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Desktop
Commits
ddd99df3
Commit
ddd99df3
authored
Dec 04, 2019
by
Aleix Pol Gonzalez
🐧
Browse files
emojier: Put the search field on the toolbar
It blends better on the UX, works just as well.
parent
cb7c6c77
Changes
1
Hide whitespace changes
Inline
Side-by-side
applets/kimpanel/backend/ibus/emojier/ui/CategoryPage.qml
View file @
ddd99df3
...
...
@@ -32,33 +32,43 @@ Kirigami.ScrollablePage
leftPadding
:
0
rightPadding
:
0
header
:
QQC2.TextField
{
id
:
searchField
Layout.fillWidth
:
true
placeholderText
:
i18n
(
"
Search...
"
)
onTextChanged
:
{
emojiModel
.
search
=
text
if
(
emojiView
.
currentIndex
<
0
)
{
emojiView
.
currentIndex
=
0
}
}
onAccepted
:
{
if
(
emojiView
.
currentItem
)
emojiView
.
currentItem
.
reportEmoji
()
}
height
:
visible
?
implicitHeight
:
0
visible
:
false
Keys.onEscapePressed
:
visible
=
false
}
actions.main
:
Kirigami.Action
{
checked
:
searchField
.
visible
icon.name
:
"
search
"
tooltip
:
i18n
(
"
Search...
"
)
shortcut
:
StandardKey
.
Find
onTriggered
:
{
searchField
.
visible
=
!
searchField
.
visible
searchField
.
focus
=
searchField
.
visible
checked
=
!
checked
}
}
titleDelegate
:
RowLayout
{
Layout.fillWidth
:
true
Layout.preferredWidth
:
view
.
width
Kirigami.Heading
{
text
:
view
.
title
Layout.fillWidth
:
true
}
QQC2.TextField
{
id
:
searchField
Layout.fillWidth
:
true
placeholderText
:
i18n
(
"
Search...
"
)
onTextChanged
:
{
emojiModel
.
search
=
text
if
(
emojiView
.
currentIndex
<
0
)
{
emojiView
.
currentIndex
=
0
}
}
onAccepted
:
{
if
(
emojiView
.
currentItem
)
emojiView
.
currentItem
.
reportEmoji
()
}
visible
:
view
.
actions
.
main
.
checked
onVisibleChanged
:
if
(
visible
)
forceActiveFocus
()
Keys.onEscapePressed
:
{
text
=
""
view
.
actions
.
main
.
checked
=
false
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment